Skip to content

Commit

Permalink
fix: store hydration error
Browse files Browse the repository at this point in the history
  • Loading branch information
nitedani committed Feb 16, 2024
1 parent 4ae7505 commit d3e9f3a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export default function VikeReactZustandWrapper({ pageContext, children }: VikeR
...pageContext._vikeReactZustand,
[key]: removeFunctionsAndUndefined(store.getState())
}
} else if (!store.__hydrated__ && !pageContext.isClientSideNavigation) {
assert(pageContext._vikeReactZustand)
// pageContext._vikeReactZustand can be undefined if ssr is disabled
} else if (pageContext._vikeReactZustand && !store.__hydrated__ && !pageContext.isClientSideNavigation) {
assert(key in pageContext._vikeReactZustand)

// TODO: remove lodash-es dependency and implement deep merging
Expand Down

0 comments on commit d3e9f3a

Please sign in to comment.