From 8607561ff529709dcc30ffed82d44ac435575535 Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Fri, 25 Oct 2024 13:38:24 +0200 Subject: [PATCH] fix: avoid mutating reactive values with deepcopy (#15) --- glue_solara/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glue_solara/app.py b/glue_solara/app.py index 8626dec..29a7c22 100644 --- a/glue_solara/app.py +++ b/glue_solara/app.py @@ -305,7 +305,7 @@ def Viewers( ): def on_viewer_close(index: int): # Remove the viewer from MDI layouts - new_mdi_layouts = mdi_layouts.value + new_mdi_layouts = copy.deepcopy(mdi_layouts.value) new_mdi_layouts.pop(index) mdi_layouts.set(new_mdi_layouts)