From c3e2eaf8a8b99028622e4f4e8f53ea7a29b33377 Mon Sep 17 00:00:00 2001 From: Siklos Date: Thu, 18 Aug 2022 16:24:54 +0200 Subject: [PATCH] Fix bug where the instance of style and userdata where referenced to the first container added. The fix apply a structured clone to these objects. --- src/utils/default.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/default.ts b/src/utils/default.ts index 90d3c1c..6bb414b 100644 --- a/src/utils/default.ts +++ b/src/utils/default.ts @@ -85,6 +85,6 @@ export const GetDefaultContainerProps = ( XPositionReference: containerConfig.XPositionReference ?? XPositionReference.Left, minWidth: containerConfig.MinWidth ?? 0, customSVG: containerConfig.CustomSVG, - style: containerConfig.Style, - userData: containerConfig.UserData + style: structuredClone(containerConfig.Style), + userData: structuredClone(containerConfig.UserData) });