Skip to content

Commit

Permalink
Use devComponent in lazy for devtools support
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Dec 27, 2024
1 parent 4d824b0 commit 9cb0e56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/solid/src/render/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ export function lazy<T extends Component<any>>(
return createMemo(() =>
(Comp = comp())
? untrack(() => {
if ("_SOLID_DEV_") Object.assign(Comp!, { [$DEVCOMP]: true });
if (!ctx || sharedConfig.done) return Comp!(props);
if (!ctx || sharedConfig.done)
return "_SOLID_DEV_" ? devComponent(Comp!, props) : Comp!(props);
const c = sharedConfig.context;
setHydrateContext(ctx);
const r = Comp!(props);
const r = "_SOLID_DEV_" ? devComponent(Comp!, props) : Comp!(props);
setHydrateContext(c);
return r;
})
Expand Down

0 comments on commit 9cb0e56

Please sign in to comment.