From f739c7fae129e143acf3765c0e768000f04c2b8e Mon Sep 17 00:00:00 2001 From: Svilen Ivanov <92510182+svilen-ivanov-kubit@users.noreply.github.com> Date: Thu, 30 Oct 2025 16:04:40 +0200 Subject: [PATCH] Avoid modifying node.measured object, create copy instead When working with immutable `node` data, modifying in-place `node.measured` properties is not allowed. Since we perform a shallow copy, we need to create a new `measured` object to populate `width` and `height` --- packages/react/src/utils/changes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/utils/changes.ts b/packages/react/src/utils/changes.ts index f2d9bdd3..422832f2 100644 --- a/packages/react/src/utils/changes.ts +++ b/packages/react/src/utils/changes.ts @@ -125,7 +125,7 @@ function applyChange(change: any, element: any): any { case 'dimensions': { if (typeof change.dimensions !== 'undefined') { - element.measured ??= {}; + element.measured = {}; element.measured.width = change.dimensions.width; element.measured.height = change.dimensions.height;