diff --git a/packages/lib/src/portal.ts b/packages/lib/src/portal.ts index 050dbfac..28d85f39 100644 --- a/packages/lib/src/portal.ts +++ b/packages/lib/src/portal.ts @@ -18,7 +18,7 @@ class Portal extends Component { } static isPortal(type: unknown): type is typeof Portal { - return !!type && typeof type === "function" && portalIdentifier in type + return typeof type === "function" && portalIdentifier in type } render(): JSX.Element { diff --git a/packages/lib/src/signal.ts b/packages/lib/src/signal.ts index f93ccca0..3d1cb5b6 100644 --- a/packages/lib/src/signal.ts +++ b/packages/lib/src/signal.ts @@ -42,7 +42,7 @@ export class Signal { } static isSignal(x: any): x is Signal { - return x && x[SignalKey] + return typeof x === "object" && !!x && SignalKey in x } static subscribeNode(node: Kaioken.VNode, signal: Signal) {