From e2a7f888e7c83b65ca787a06f4d462147c9242cb Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Fri, 8 Jan 2021 18:20:48 +0100 Subject: [PATCH] fix drawing example --- docs/src/demos/Examples/Drawing/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/demos/Examples/Drawing/index.vue b/docs/src/demos/Examples/Drawing/index.vue index e6d6dc85..a5b3f506 100644 --- a/docs/src/demos/Examples/Drawing/index.vue +++ b/docs/src/demos/Examples/Drawing/index.vue @@ -21,12 +21,13 @@ export default { data() { return { editor: null, + provider: null, } }, mounted() { const ydoc = new Y.Doc() - const provider = new WebsocketProvider('wss://websocket.tiptap.dev', 'tiptap-draw-example', ydoc) + this.provider = new WebsocketProvider('wss://websocket.tiptap.dev', 'tiptap-draw-example', ydoc) this.editor = new Editor({ extensions: [ @@ -44,6 +45,7 @@ export default { beforeDestroy() { this.editor.destroy() + this.provider.destroy() }, }