Skip to content

Commit

Permalink
use correct hydration id in server lazy (#2303)
Browse files Browse the repository at this point in the history
* use correct hydration id in server lazy

* Create smart-drinks-reply.md

---------

Co-authored-by: Ryan Carniato <[email protected]>
  • Loading branch information
mdynnl and ryansolid authored Sep 23, 2024
1 parent 9e192d7 commit 379293d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-drinks-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solid-js": patch
---

use correct hydration id in server lazy
2 changes: 1 addition & 1 deletion packages/solid/src/server/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export function lazy<T extends Component<any>>(
const wrap: Component<ComponentProps<T>> & {
preload?: () => Promise<{ default: T }>;
} = props => {
const id = sharedConfig.context!.id.slice(0, -1);
const id = sharedConfig.context!.id;
let ref = sharedConfig.context!.lazy[id];
if (ref) p = ref;
else load(id);
Expand Down

0 comments on commit 379293d

Please sign in to comment.