Skip to content

Commit

Permalink
Merge pull request #113 from MakairaIO/fix/update-handle-event-listen…
Browse files Browse the repository at this point in the history
…er-storefront-react

fix: allow reset user state with undefined value after logout
  • Loading branch information
datlieu110 authored Sep 14, 2023
2 parents cdc86da + 2b51fe6 commit 004b25b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/storefront-react/src/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,7 @@ const ShopProvider: React.FC<ShopProviderProps> = ({
) {
const { data: eventData } = event

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

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

0 comments on commit 004b25b

Please sign in to comment.