Skip to content

Commit

Permalink
feat(ui): Environment modal > prevent closing editor if invalid json (r…
Browse files Browse the repository at this point in the history
…esolves #305)
  • Loading branch information
flawiddsouza committed Jan 24, 2025
1 parent 4c21f24 commit d287245
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui/src/components/modals/EnvironmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ export default {
return this.showModal
},
set(value) {
if (this.parseError) {
this.$toast.error('Invalid JSON. Please fix the error before closing the editor.')
return
}
this.$emit('update:showModal', value)
}
},
Expand Down

0 comments on commit d287245

Please sign in to comment.