Skip to content

Commit

Permalink
Merge pull request #366 from samualtnorman/main
Browse files Browse the repository at this point in the history
fix throwing an error when using `<NoHydration>` before `sharedConfig.context` is initialised
  • Loading branch information
ryansolid authored Oct 21, 2024
2 parents 388985b + a43c68b commit 58dced2
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 58dced2

Please sign in to comment.