Skip to content

Commit b12ee9b

Browse files
authored
Check for presence of __l (#495)
If a defaultValue is specified we would erroneously take that as the contextRef rather than the actual ref
1 parent 4d188ff commit b12ee9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/adapter/10/bindings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function getDisplayName(vnode: VNode, config: RendererConfig): string {
212212

213213
// Provider
214214
if ((c as any).sub) {
215-
const ctx = (type as any)._contextRef || (type as any).__ || (type as any).__l;
215+
const ctx = (type as any)._contextRef || ('__l' in type ? (type as any).__l : (type as any).__);
216216
if (ctx && ctx.displayName) {
217217
return `${ctx.displayName}.Provider`;
218218
}

0 commit comments

Comments
 (0)