Skip to content

Commit

Permalink
Chagnes from preactjs/preact#4632
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Jan 15, 2025
1 parent 5f94f09 commit e0fe6d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapter/10/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function getHookState(
// useContext
if (type === HookType.useContext) {
const context = list[index]._context || list[index].__c || list[index].c;
const provider = c.context[context._id] || c.context[context.__c] || c.context[context.__l];
const provider = c.context[context._id] || c.context[context.__c];
return provider
? provider.props.value
: context._defaultValue || context.__;
Expand Down Expand Up @@ -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).__c;
const ctx = (type as any)._contextRef || (type as any).__ || (type as any).__l;
if (ctx && ctx.displayName) {
return `${ctx.displayName}.Provider`;
}
Expand Down

0 comments on commit e0fe6d7

Please sign in to comment.