We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 307af6d commit f77ab60Copy full SHA for f77ab60
frontend/src/components/CodeViewer/index.vue
@@ -125,8 +125,13 @@ watch(
125
},
126
)
127
128
-onMounted(() => setTimeout(() => initEditor(), inject(IS_IN_MODAL, false) ? 100 : 0))
129
-onUnmounted(() => (editorView || mergeView).destroy())
+let timer: number
+onMounted(() => (timer = setTimeout(() => initEditor(), inject(IS_IN_MODAL, false) ? 100 : 0)))
130
+onUnmounted(() => {
131
+ clearTimeout(timer)
132
+ const view = editorView || mergeView
133
+ view?.destroy()
134
+})
135
136
const initEditor = () => {
137
domRef.value!.innerHTML = ''
0 commit comments