Skip to content

Commit

Permalink
Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Dec 29, 2024
1 parent 6740b2c commit 1006fd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/create-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export function createElement(type, props, children) {
ref,
i;

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

Expand Down

0 comments on commit 1006fd9

Please sign in to comment.