From b7dc1d6275ed28b1e37b6cb512b2c5d1600a8f63 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Fri, 12 Aug 2022 21:35:25 -0400 Subject: [PATCH] fix(wrapReactType): try another method --- src/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index c2b3547..a1d0fb0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -83,8 +83,7 @@ export function unpatch(obj: any, name: any): void { } export function wrapReactType(node: any) { - const oldComponent = node.type; - return node.type = (...args: any[]) => React.createElement(oldComponent, ...args) + return node.type = {...node.type} } export function getReactInstance(o: HTMLElement | Element | Node) {