Skip to content

Commit 04eec96

Browse files
authored
Merge pull request #238 from keithchong/NoJira-ProtectAgainstNullMetricResults
Protect against null metrics data (#NoBug)
2 parents f8ae245 + 992ff31 commit 04eec96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/gitops/components/rollout/components/PodList

src/gitops/components/rollout/components/PodList/PodList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ export const PodList: React.FC<PodListProps> = ({ rollout, namespace, selector }
497497

498498
function getMetric(podName: string, results): string {
499499
let value = '-';
500-
if (results.data) {
500+
if (results?.data) {
501501
results.data.result.forEach((result) => {
502502
if (result.metric.pod == podName) {
503503
value = '' + result.value[1];

0 commit comments

Comments
 (0)