Skip to content

Commit

Permalink
Revert "fix: allow reset user state with undefined value after logout"
Browse files Browse the repository at this point in the history
This reverts commit 4759101.
  • Loading branch information
datlieu110 committed Sep 13, 2023
1 parent 4759101 commit cdc86da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/storefront-react/src/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ const ShopProvider: React.FC<ShopProviderProps> = ({
) {
const { data: eventData } = event

setUser(eventData.data)
if (eventData.data) {
setUser(eventData.data)
}

if (eventData.raw) {
setRawUser(eventData.raw)
Expand Down

0 comments on commit cdc86da

Please sign in to comment.