From 8408351e870a3e3cd530abd5b7ca58359c38f3e2 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Wed, 7 Feb 2024 10:33:25 +0100 Subject: [PATCH] feat: add primitive conditional to patch object prop --- src/core/nodeOps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/nodeOps.ts b/src/core/nodeOps.ts index fb341896d..d16f80192 100644 --- a/src/core/nodeOps.ts +++ b/src/core/nodeOps.ts @@ -192,7 +192,7 @@ export const nodeOps: RendererOptions = { if (node) { let root = node let key = prop - if (key === 'object' && prevValue !== null) { + if (node.__tres.primitive && key === 'object' && prevValue !== null) { // If the prop 'object' is changed, we need to re-instance the object and swap the old one with the new one const newInstance = nodeOps.createElement('primitive', undefined, undefined, { object: nextValue,