From 0858fb6f99cb5f757bad1109f23ca1f11a1ed1be Mon Sep 17 00:00:00 2001 From: Denise Li Date: Wed, 30 Oct 2024 17:29:44 -0400 Subject: [PATCH] fix: console undefined bug (#3258) --- frontend/console/src/features/modules/module.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/console/src/features/modules/module.utils.ts b/frontend/console/src/features/modules/module.utils.ts index 293f9b1641..6d5d056aa7 100644 --- a/frontend/console/src/features/modules/module.utils.ts +++ b/frontend/console/src/features/modules/module.utils.ts @@ -236,7 +236,7 @@ const verbIcon = (declCase: string, decl: DeclSumType) => { const verbTypesFromMetadata = ['cronjob', 'ingress', 'subscriber'] export const verbTypeFromMetadata = (verb: Verb) => { - const found = verb.metadata.find((m) => m.value.case && verbTypesFromMetadata.includes(m.value.case.toLowerCase())) + const found = verb.metadata?.find((m) => m.value.case && verbTypesFromMetadata.includes(m.value.case.toLowerCase())) return found?.value.case?.toLowerCase() }