From 46a78e3ef76bb5c59725df2e7cd7856ae9d20e2a Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Wed, 27 Sep 2023 15:12:01 +0200 Subject: [PATCH] fix: account for array length (#4849) Small fix to account for array length in conditional check --- .../ChangeRequest/Changes/Change/StrategyChange.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx index b814666e5d..a917e5f79a 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx @@ -131,7 +131,9 @@ export const StrategyChange: VFC<{ change.action === 'addStrategy' || change.action === 'updateStrategy'; const featureStrategyVariantsDisplay = - isStrategyAction && change.payload.variants ? ( + isStrategyAction && + change.payload.variants && + change.payload.variants.length > 0 ? ( Updating feature variants to: