state passed to ExtensionManager is not updated

using view.state instead
This commit is contained in:
Chrissi2812
2019-02-26 11:33:54 +01:00
parent 7762316ecd
commit 89e6436114
2 changed files with 3 additions and 4 deletions

View File

@@ -68,8 +68,7 @@ export default class Editor {
state: this.state, state: this.state,
}) })
// give extension manager access to our view and state // give extension manager access to our view
this.extensions.state = this.state
this.extensions.view = this.view this.extensions.view = this.view
} }

View File

@@ -16,7 +16,7 @@ export default class ExtensionManager {
} }
get options() { get options() {
const { state, view } = this const { view } = this
return this.extensions return this.extensions
// { name, options, update = () => {} } // { name, options, update = () => {} }
.reduce((nodes, extension) => ({ .reduce((nodes, extension) => ({
@@ -28,7 +28,7 @@ export default class ExtensionManager {
obj[prop] = value obj[prop] = value
if (changed) { if (changed) {
extension.update({ state, view }) extension.update(view)
} }
return true return true