From 9cb0e562de2e1ca588965ecbb69d6b29288b93f3 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Fri, 27 Dec 2024 23:34:05 +0100 Subject: [PATCH] Use `devComponent` in `lazy` for devtools support --- packages/solid/src/render/component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/solid/src/render/component.ts b/packages/solid/src/render/component.ts index 83bc7a32..ea92a110 100644 --- a/packages/solid/src/render/component.ts +++ b/packages/solid/src/render/component.ts @@ -376,11 +376,11 @@ export function lazy>( 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; })