diff --git a/packages/hoppscotch-app/helpers/editor/codemirror.ts b/packages/hoppscotch-app/helpers/editor/codemirror.ts index caac52e61..772774a02 100644 --- a/packages/hoppscotch-app/helpers/editor/codemirror.ts +++ b/packages/hoppscotch-app/helpers/editor/codemirror.ts @@ -259,7 +259,8 @@ export function useCodemirror( watch(el, () => { if (el.value) { - if (!view.value) initView(el.value) + if (view.value) view.value.destroy() + initView(el.value) } else { view.value?.destroy() view.value = undefined