useMemo removed for simple calculations. changes to these props were not picked up if new events changed their result (#142810)

Co-authored-by: Karl Godard <karlgodard@elastic.co>
This commit is contained in:
Karl Godard 2022-10-05 19:43:14 -07:00 committed by GitHub
parent 4f649c09c5
commit 275da5403f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,8 +99,8 @@ export function ProcessTreeNode({
}, [selectedProcess, process, childrenExpanded]);
const alerts = process.getAlerts();
const hasAlerts = useMemo(() => !!alerts.length, [alerts]);
const hasOutputs = useMemo(() => process.hasOutput(), [process]);
const hasAlerts = !!alerts.length;
const hasOutputs = process.hasOutput();
const hasInvestigatedAlert = useMemo(
() =>
!!(