Config Editor BUG fixed when you breaked JSON format

This commit is contained in:
Luis Fernando Molina committed 2021-01-14 12:39:34 +01:00
1 parent 7bcf630486
commit 321bd5c7bc
1 file changed
+6 -1
@@ -73,7 +73,12 @@ function newConfigEditor() {
thisObject.payload.uiObject.uiObjectTitle.exitEditMode()
let textArea = document.getElementById('textArea')
textArea.value = JSON.stringify(JSON.parse(thisObject.payload.node.config), undefined, 4)
try {
textArea.value = JSON.stringify(JSON.parse(thisObject.payload.node.config), undefined, 4)
} catch(err) {
textArea.value = thisObject.payload.node.config
}
textArea.style = 'resize: none;' +
' border: none;' +
' outline: none;' +