From ade1fadf88a3b140205a8055fdb6ad3cf4432ded Mon Sep 17 00:00:00 2001 From: Andreas Tzionis Date: Wed, 12 Jul 2023 15:12:41 +0300 Subject: [PATCH] fixed bug --- lib/client/grapes/editor/initEditor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/client/grapes/editor/initEditor.tsx b/lib/client/grapes/editor/initEditor.tsx index d1975511..bbedf021 100644 --- a/lib/client/grapes/editor/initEditor.tsx +++ b/lib/client/grapes/editor/initEditor.tsx @@ -50,7 +50,10 @@ const initEditor = async (startServer = true, standaloneServer: boolean): Promis if (startServer) { editor.on('storage:store', () => { - const e = { components: editor.getComponents(), styles: editor.getStyles() } + const e = { + components: JSON.stringify(editor.getComponents()), + styles: JSON.stringify(editor.getStyle()), + } saveTemplate(e, standaloneServer) }) const data = await loadTemplate(standaloneServer)