From 6f9e7fe7e918ccab118505d6021069aa3ba2113c Mon Sep 17 00:00:00 2001 From: Jordan Blasenhauer Date: Tue, 23 Jul 2024 14:45:11 +0200 Subject: [PATCH] fix circular JSON dep --- .../client/dashboard/components/Form/Raw.vue | 12 +++++++---- src/ui/client/dashboard/store/form.js | 20 +++++++++++++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/ui/client/dashboard/components/Form/Raw.vue b/src/ui/client/dashboard/components/Form/Raw.vue index 64086fffe..cd22596df 100644 --- a/src/ui/client/dashboard/components/Form/Raw.vue +++ b/src/ui/client/dashboard/components/Form/Raw.vue @@ -79,10 +79,11 @@ const data = reactive({ jsonReady = "{" + jsonReady.slice(0, -1) + "}"; try { - const data = JSON.parse(jsonReady); - rawForm.setTemplate(data); + const json = JSON.parse(jsonReady); + rawForm.setTemplate(json); return true; } catch (e) { + console.log(e); return false; } }), @@ -116,7 +117,6 @@ function json2raw(json) { } const editorData = { - value: data.str, name: `raw-editor-${uuidv4()}`, label: `raw-editor-${uuidv4()}`, hideLabel: true, @@ -150,7 +150,11 @@ onBeforeMount(() => { - +