From 9f9e50c462ed3b4198bb42935b3214b9426e052f Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 15 Jan 2025 09:23:59 +0100 Subject: [PATCH] Check for presence of __l If a defaultValue is specified we would erroneously take that as the contextRef rather than the actual ref --- src/adapter/10/bindings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter/10/bindings.ts b/src/adapter/10/bindings.ts index d00a19cf..ffe0532d 100644 --- a/src/adapter/10/bindings.ts +++ b/src/adapter/10/bindings.ts @@ -212,7 +212,7 @@ export function getDisplayName(vnode: VNode, config: RendererConfig): string { // Provider if ((c as any).sub) { - const ctx = (type as any)._contextRef || (type as any).__ || (type as any).__l; + const ctx = (type as any)._contextRef || ('__l' in type ? (type as any).__l : (type as any).__); if (ctx && ctx.displayName) { return `${ctx.displayName}.Provider`; }