π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix(SyntaxError): Unexpected non-whitespace character after JSON at position 8 (line 1 column 9)
Ramesh Mane4d1636573510
diff --git a/packages/nc-gui/components/monaco/Editor.vue b/packages/nc-gui/components/monaco/Editor.vueindex 2ee7ff1813..100faf5126 100644--- a/packages/nc-gui/components/monaco/Editor.vue+++ b/packages/nc-gui/components/monaco/Editor.vue@@ -257,8 +257,12 @@ watch(vModel, (v) => {const editorValue = editor?.getValue()if (!disableDeepCompare && lang === 'json') {- if (!editorValue || !deepCompare(JSON.parse(v), JSON.parse(editorValue))) {- editor.setValue(v)+ try {+ if (!editorValue || !deepCompare(JSON.parse(v), JSON.parse(editorValue))) {+ editor.setValue(v)+ }+ } catch (e) {+ console.error('Failed to parse JSON:', e)}} else {if (editorValue !== v) editor.setValue(v)