From 987274ad2dfbb778e3316e81a9a46f1e9c789962 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sat, 17 Sep 2022 20:01:00 -0500 Subject: [PATCH] Fix bug part 2 --- web/hooks/use-prob-changes.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/hooks/use-prob-changes.tsx b/web/hooks/use-prob-changes.tsx index a6f89a2a..3e0e1a1a 100644 --- a/web/hooks/use-prob-changes.tsx +++ b/web/hooks/use-prob-changes.tsx @@ -31,10 +31,10 @@ export const useProbChangesAlgolia = (userId: string) => { return { positiveChanges: positiveData.hits.filter( - (c) => c && c.probChanges.day > 0 + (c) => c.probChanges && c.probChanges.day > 0 ), negativeChanges: negativeData.hits.filter( - (c) => c && c.probChanges.day < 0 + (c) => c.probChanges && c.probChanges.day < 0 ), } }