fix: prevent error if json editor not mounted (#1945)

This commit is contained in:
Axel Baudot
2023-07-27 13:59:50 +02:00
committed by GitHub
parent 7c354ef74f
commit bdde59d7b3
@@ -102,7 +102,9 @@
}
schema = schema
schemaString = JSON.stringify(schema, null, '\t')
jsonEditor.setCode(schemaString)
if (jsonEditor) {
jsonEditor.setCode(schemaString)
}
dispatch('change', schema)
}