Skip to content

Commit

Permalink
fix throwing an error when using <NoHydration> before `sharedConfig…
Browse files Browse the repository at this point in the history
….context` is initialised
  • Loading branch information
samualtnorman committed Oct 14, 2024
1 parent 388985b commit a43c68b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/dom-expressions/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ export function Hydration(props) {
}

export function NoHydration(props) {
sharedConfig.context.noHydrate = true;
if (sharedConfig.context)
sharedConfig.context.noHydrate = true;
return props.children;
}

Expand Down

0 comments on commit a43c68b

Please sign in to comment.