From 03a5d5ccf91887c3f98388f80b9263762d337496 Mon Sep 17 00:00:00 2001 From: Robinnnnn Date: Wed, 10 Jan 2024 18:24:05 -0500 Subject: [PATCH] fix experience mutation payload --- packages/shared/src/hooks/useExperience.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/hooks/useExperience.ts b/packages/shared/src/hooks/useExperience.ts index 81b8ae84f8..9bff447a70 100644 --- a/packages/shared/src/hooks/useExperience.ts +++ b/packages/shared/src/hooks/useExperience.ts @@ -60,7 +60,8 @@ export default function useExperience({ type, queryRef }: Props): [boolean, user return; } - const { experienced } = props; + // if props aren't properly supplied, default to true to dismiss the experience + const experienced = props?.experienced ?? true; const optimisticExperiencesList = userExperiences.map((experience) => { if (experience.type === type) {