From 076b1d14b2474370545c2cc4a675fa57406feaff Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 22 Feb 2024 20:57:32 +0100 Subject: [PATCH] reserialize and serialize jsonconfig --- src/mixins/ConfigSaving.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mixins/ConfigSaving.js b/src/mixins/ConfigSaving.js index afe38607..968624a6 100644 --- a/src/mixins/ConfigSaving.js +++ b/src/mixins/ConfigSaving.js @@ -26,7 +26,9 @@ export default { if (isSubPag) delete jsonConfig.appConfig; // 2. Convert JSON into YAML const yamlOptions = {}; - const yaml = jsYaml.dump(jsonConfig, yamlOptions); + const strjsonConfig = JSON.stringify(jsonConfig); + const jsonObj = JSON.parse(strjsonConfig); + const yaml = jsYaml.dump(jsonObj, yamlOptions); // 3. Prepare the request const baseUrl = process.env.VUE_APP_DOMAIN || window.location.origin; const endpoint = `${baseUrl}${serviceEndpoints.save}`;