Skip to content

Commit

Permalink
fix: use shallowRef on Editor (#1804)
Browse files Browse the repository at this point in the history
  • Loading branch information
nVitius authored Aug 26, 2021
1 parent 96a7310 commit 46701fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vue-3/src/useEditor.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { onMounted, onBeforeUnmount, ref } from 'vue'
import { onMounted, onBeforeUnmount, shallowRef } from 'vue'
import { EditorOptions } from '@tiptap/core'
import { Editor } from './Editor'

export const useEditor = (options: Partial<EditorOptions> = {}) => {
const editor = ref<Editor>()
const editor = shallowRef<Editor>()

onMounted(() => {
editor.value = new Editor(options)
Expand Down

0 comments on commit 46701fd

Please sign in to comment.