chore: remove unwanted debug info (#2851)
This commit is contained in:
parent
356fe4591f
commit
1ecd22204d
1 changed files with 9 additions and 26 deletions
|
|
@ -40,8 +40,6 @@ import {
|
|||
import { HoppEnvironmentPlugin } from "@helpers/editor/extensions/HoppEnvironment"
|
||||
// TODO: Migrate from legacy mode
|
||||
|
||||
import { captureException } from "@sentry/vue"
|
||||
|
||||
type ExtendedEditorConfig = {
|
||||
mode: string
|
||||
placeholder: string
|
||||
|
|
@ -286,7 +284,7 @@ export function useCodemirror(
|
|||
view.value?.destroy()
|
||||
})
|
||||
|
||||
watch(value, (newVal, oldVal) => {
|
||||
watch(value, (newVal) => {
|
||||
if (newVal === undefined) {
|
||||
view.value?.destroy()
|
||||
view.value = undefined
|
||||
|
|
@ -297,29 +295,14 @@ export function useCodemirror(
|
|||
initView(el.value)
|
||||
}
|
||||
if (cachedValue.value !== newVal) {
|
||||
try {
|
||||
view.value?.dispatch({
|
||||
filter: false,
|
||||
changes: {
|
||||
from: 0,
|
||||
to: view.value.state.doc.length,
|
||||
insert: newVal,
|
||||
},
|
||||
})
|
||||
} catch (e) {
|
||||
captureException(e, {
|
||||
extra: {
|
||||
newVal,
|
||||
oldVal,
|
||||
changes: {
|
||||
from: 0,
|
||||
to: view.value?.state.doc.length,
|
||||
insert: newVal,
|
||||
cachedValue,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
view.value?.dispatch({
|
||||
filter: false,
|
||||
changes: {
|
||||
from: 0,
|
||||
to: view.value.state.doc.length,
|
||||
insert: newVal,
|
||||
},
|
||||
})
|
||||
}
|
||||
cachedValue.value = newVal
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue