Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
3dGrabber authored May 30, 2022
1 parent 40b8818 commit cfb30e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ function isIgnored(target: any): target is null | undefined | boolean {
}

function isChild(target: any): target is number | string | ReactElement<any> {
return typeof target === 'number' || typeof target === 'string' || typeof target === 'object' && !!target.type
return typeof target === 'number' || typeof target === 'string' || typeof target === 'object' && target.$$typeof === Symbol.for("react.element")
}

function addChild<P>(state: BuilderState<P>, child: ReactNode) {
return assign({}, state, { children: [...state.children || [], child] })
}

export default njsx as NJSX
export default njsx as NJSX

0 comments on commit cfb30e7

Please sign in to comment.