mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
fix: json schema validation 'no validation' reset errors
This commit is contained in:
1 parent
fbe9c58cc4
commit
b700c2cfdd
1 file changed
+4
@@ -22,6 +22,10 @@ export function useJsonSchemaValidation({ json, schemaUrl, schemaData }: { json:
|
||||
});
|
||||
|
||||
watch([schemaUrl, schemaData].filter(isRef), async () => {
|
||||
if (get(schemaUrl) === '') {
|
||||
schema.value = null;
|
||||
errors.value = [];
|
||||
}
|
||||
if (get(schemaUrl) === 'custom') {
|
||||
try {
|
||||
schema.value = JSON.parse(get(schemaData)) as Schema;
|
||||
|
||||
Reference in new issue
Block a user