Browse Source

fix(gui-v2): fix json validation logic

pull/2885/head
Wing-Kam Wong 2 years ago
parent
commit
9c4594ef34
  1. 5
      packages/nc-gui-v2/components/dlg/QuickImport.vue
  2. 3
      packages/nc-gui-v2/components/template/Editor.vue

5
packages/nc-gui-v2/components/dlg/QuickImport.vue

@ -141,9 +141,14 @@ async function handlePreImport() {
}
async function handleImport() {
try {
loading.value = true
await templateEditorRef.value.importTemplate()
} catch (e: any) {
return toast.error(await extractSdkResponseErrorMsg(e))
} finally {
loading.value = false
}
dialogShow.value = false
}

3
packages/nc-gui-v2/components/template/Editor.vue

@ -174,9 +174,8 @@ async function importTemplate() {
try {
await validate()
} catch (errorInfo) {
toast.error('Please fill all the required values')
isImporting.value = false
return
throw new Error('Please fill all the required values')
}
try {

Loading…
Cancel
Save