Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Disable auto-freezing for Safari structuredClone compatibility in sync-stores (#4106)

Ivan Starkov8f48a7bb7937
diff --git a/apps/builder/app/shared/sync/sync-stores.ts b/apps/builder/app/shared/sync/sync-stores.ts
index e4b2383563..4f336aee10 100644
--- a/apps/builder/app/shared/sync/sync-stores.ts
+++ b/apps/builder/app/shared/sync/sync-stores.ts
@@ -1,6 +1,6 @@
import { nanoid } from "nanoid";
import { Store, type Change } from "immerhin";
-import { enableMapSet } from "immer";
+import { enableMapSet, setAutoFreeze } from "immer";
import type { WritableAtom } from "nanostores";
import { useEffect } from "react";
import { type Publish, subscribe } from "~/shared/pubsub";
@@ -45,6 +45,8 @@ import {
import { $ephemeralStyles } from "~/canvas/stores";
enableMapSet();
+// safari structuredClone fix
+setAutoFreeze(false);
const appId = nanoid();