From 89e6436114985e77a81e19493b29403635b209ee Mon Sep 17 00:00:00 2001 From: Chrissi2812 Date: Tue, 26 Feb 2019 11:33:54 +0100 Subject: [PATCH] state passed to ExtensionManager is not updated using view.state instead --- packages/tiptap/src/Editor.js | 3 +-- packages/tiptap/src/Utils/ExtensionManager.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/tiptap/src/Editor.js b/packages/tiptap/src/Editor.js index 053e3b24..321078c1 100644 --- a/packages/tiptap/src/Editor.js +++ b/packages/tiptap/src/Editor.js @@ -68,8 +68,7 @@ export default class Editor { state: this.state, }) - // give extension manager access to our view and state - this.extensions.state = this.state + // give extension manager access to our view this.extensions.view = this.view } diff --git a/packages/tiptap/src/Utils/ExtensionManager.js b/packages/tiptap/src/Utils/ExtensionManager.js index b5cce07b..21cbd216 100644 --- a/packages/tiptap/src/Utils/ExtensionManager.js +++ b/packages/tiptap/src/Utils/ExtensionManager.js @@ -16,7 +16,7 @@ export default class ExtensionManager { } get options() { - const { state, view } = this + const { view } = this return this.extensions // { name, options, update = () => {} } .reduce((nodes, extension) => ({ @@ -28,7 +28,7 @@ export default class ExtensionManager { obj[prop] = value if (changed) { - extension.update({ state, view }) + extension.update(view) } return true