diff --git a/src/index.ts b/src/index.ts index 50380a4..c104e51 100644 --- a/src/index.ts +++ b/src/index.ts @@ -91,11 +91,11 @@ function isIgnored(target: any): target is null | undefined | boolean { } function isChild(target: any): target is number | string | ReactElement { - 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

(state: BuilderState

, child: ReactNode) { return assign({}, state, { children: [...state.children || [], child] }) } -export default njsx as NJSX \ No newline at end of file +export default njsx as NJSX