From cfb30e74e237b5749074dfdc2d35400dce8b314d Mon Sep 17 00:00:00 2001 From: Ivo Graber <3dGrabber@users.noreply.github.com> Date: Mon, 30 May 2022 11:53:14 +0200 Subject: [PATCH] Fixes #9 --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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