From 2b51fe6e5d5c22c2f9068b42fd1a1b91154d939d Mon Sep 17 00:00:00 2001 From: Dat Lieu Date: Wed, 13 Sep 2023 17:08:39 +0700 Subject: [PATCH] fix: allow reset user state with undefined value after logout --- packages/storefront-react/src/context.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/storefront-react/src/context.tsx b/packages/storefront-react/src/context.tsx index 2960005..50e2cdf 100755 --- a/packages/storefront-react/src/context.tsx +++ b/packages/storefront-react/src/context.tsx @@ -362,9 +362,7 @@ const ShopProvider: React.FC = ({ ) { const { data: eventData } = event - if (eventData.data) { - setUser(eventData.data) - } + setUser(eventData.data) if (eventData.raw) { setRawUser(eventData.raw)