Browse Source

fix(nc-gui): RangeError: Maximum call stack size exceeded

pull/4931/head
Wing-Kam Wong 2 years ago
parent
commit
0bf151d874
  1. 4
      packages/nc-gui/components/cell/attachment/Modal.vue

4
packages/nc-gui/components/cell/attachment/Modal.vue

@ -44,15 +44,13 @@ function onClick(item: Record<string, any>) {
selectedImage.value = item selectedImage.value = item
modalVisible.value = false modalVisible.value = false
const stopHandle = watch(selectedImage, (nextImage, _, onCleanup) => { const stopHandle = watch(selectedImage, (nextImage) => {
if (!nextImage) { if (!nextImage) {
setTimeout(() => { setTimeout(() => {
modalVisible.value = true modalVisible.value = true
}, 50) }, 50)
stopHandle?.() stopHandle?.()
} }
onCleanup(() => stopHandle?.())
}) })
} }
</script> </script>

Loading…
Cancel
Save