diff --git a/src/index.tsx b/src/index.tsx index 849f27d..0097959 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -194,7 +194,7 @@ export function useContextMap(): ContextMap { contextMap.clear() let node = fiber while (node) { - const context = node.type?._context ?? node.type + const context = node.type?._context if (context && context !== FiberContext && !contextMap.has(context)) { contextMap.set(context, ReactCurrentDispatcher?.current?.readContext(wrapContext(context))) }