From 0a98827b4c2bd40f25992e1bc0c767f1fffa32f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sat, 4 May 2019 10:54:53 +0200 Subject: [PATCH] refactoring --- examples/Components/Routes/Collaboration/index.vue | 2 +- packages/tiptap-extensions/src/extensions/Collaboration.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Components/Routes/Collaboration/index.vue b/examples/Components/Routes/Collaboration/index.vue index 293541e5..a3b8e093 100644 --- a/examples/Components/Routes/Collaboration/index.vue +++ b/examples/Components/Routes/Collaboration/index.vue @@ -51,7 +51,7 @@ export default { mounted() { this.socket = io('wss://tiptap-sockets.glitch.me') .on('init', data => this.onInit(data)) - .on('update', data => this.editor.extensions.options.collaboration.onUpdate(data)) + .on('update', data => this.editor.extensions.options.collaboration.update(data)) }, beforeDestroy() { diff --git a/packages/tiptap-extensions/src/extensions/Collaboration.js b/packages/tiptap-extensions/src/extensions/Collaboration.js index 47250dd4..f0f714ed 100644 --- a/packages/tiptap-extensions/src/extensions/Collaboration.js +++ b/packages/tiptap-extensions/src/extensions/Collaboration.js @@ -26,7 +26,7 @@ export default class CollaborationExtension extends Extension { clientID: Math.floor(Math.random() * 0xFFFFFFFF), debounce: 250, onSendable: () => {}, - onUpdate: ({ steps, version }) => { + update: ({ steps, version }) => { const { state, view, schema } = this.editor if (getVersion(state) > version) {