Skip to content

Commit 90061fb

Browse files
committed
Fix validation for index threshold when selecting an index
1 parent 0145121 commit 90061fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold

x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
293293
defaultMessage: 'index',
294294
}
295295
)}
296-
value={index ? index.join(' ') : firstFieldOption.text}
296+
value={index && index.length > 0 ? index.join(' ') : firstFieldOption.text}
297297
isActive={indexPopoverOpen}
298298
onClick={() => {
299299
setIndexPopoverOpen(true);
300300
}}
301-
color={index ? 'secondary' : 'danger'}
301+
color={index && index.length > 0 ? 'secondary' : 'danger'}
302302
/>
303303
}
304304
isOpen={indexPopoverOpen}

0 commit comments

Comments
 (0)