Skip to content

Commit bcb933b

Browse files
committed
Fix type
1 parent ffe8e81 commit bcb933b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/create-element.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export function createElement(type, props, children) {
1919
ref,
2020
i;
2121

22-
if (typeof type === 'object' && type != null && 'Provider' in type) {
22+
// @ts-expect-error type can't be null, however TS is confused
23+
if (type != null && typeof type === 'object' && 'Provider' in type) {
24+
// @ts-expect-error
2325
type = type.Provider;
2426
}
2527

0 commit comments

Comments
 (0)