diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx index 1a2f6b2b651bb..d20042ddd9443 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx @@ -94,13 +94,13 @@ export const AnomalyTimeline: FC = React.memo( viewBySwimlaneData, } = explorerState; - const [severityUpdate, setSeverityUpdate] = useState(swimLaneSeverity ?? 0); + const [severityUpdate, setSeverityUpdate] = useState(swimLaneSeverity); useDebounce( () => { if (severityUpdate === swimLaneSeverity) return; - explorerService.setSwimLaneSeverity(severityUpdate); + explorerService.setSwimLaneSeverity(severityUpdate!); }, 500, [severityUpdate, swimLaneSeverity] @@ -207,7 +207,7 @@ export const AnomalyTimeline: FC = React.memo( { setSeverityUpdate(update); }, [])}