diff --git a/apps/web/components/admin/page-editor/index.tsx b/apps/web/components/admin/page-editor/index.tsx index 86b3ec3d2..744d1dcd9 100644 --- a/apps/web/components/admin/page-editor/index.tsx +++ b/apps/web/components/admin/page-editor/index.tsx @@ -167,17 +167,10 @@ export default function PageEditor({ } useEffect(() => { - if (!page.pageId) { - return; - } - const referenceLayout = page.draftLayout ?? page.layout; - if (!referenceLayout) { - return; - } - if (JSON.stringify(layout) !== JSON.stringify(referenceLayout)) { + if (JSON.stringify(layout) !== JSON.stringify(page.draftLayout)) { debouncedSave(page.pageId, layout); } - }, [layout, page.pageId, page.draftLayout, page.layout, debouncedSave]); + }, [layout]); useEffect(() => { if (draftTypefaces.length) {