From c05584308f560926a07ebaaf0f9141fda90b8d8c Mon Sep 17 00:00:00 2001 From: Marcos Rigoli Date: Thu, 11 Jul 2024 15:54:51 -0300 Subject: [PATCH] fix: Casting number to string for useDecision() payload. Co-authored-by: Zachary Hancock --- src/hooks/useOptimizelyExperiment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useOptimizelyExperiment.js b/src/hooks/useOptimizelyExperiment.js index 2db47e9f..c2393b19 100644 --- a/src/hooks/useOptimizelyExperiment.js +++ b/src/hooks/useOptimizelyExperiment.js @@ -11,7 +11,7 @@ const useOptimizelyExperiment = (flag) => { const dispatch = useDispatch(); const { userId } = getAuthenticatedUser(); - const [decision] = useDecision(flag, { autoUpdate: true }, { id: userId }); + const [decision] = useDecision(flag, { autoUpdate: true }, { id: userId.toString() }); const { active, variationKey } = decision || {}; useEffect(() => {