42772 condition editor error handling (#502)
* fix password reset bug * condition editor error handling * fix syntax error * fix syntax --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -8,23 +8,26 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const error = ref()
|
||||
const emit = defineEmits(['on-error'])
|
||||
function clearError() {
|
||||
error.value = undefined
|
||||
}
|
||||
onErrorCaptured(err => {
|
||||
error.value = err
|
||||
emit('on-error', err)
|
||||
return false
|
||||
})
|
||||
const route = useRoute()
|
||||
watch(
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
error.value = undefined
|
||||
<script setup>
|
||||
const error = ref()
|
||||
const emit = defineEmits(['on-error'])
|
||||
function clearError() {
|
||||
error.value = undefined
|
||||
}
|
||||
)
|
||||
</script>
|
||||
onErrorCaptured(err => {
|
||||
error.value = err
|
||||
emit('on-error', err)
|
||||
return false
|
||||
})
|
||||
const route = useRoute()
|
||||
watch(
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
error.value = undefined
|
||||
}
|
||||
)
|
||||
defineExpose({
|
||||
clearError
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user