Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Apr 12, 2020
1 parent 9bf8be4 commit 3e7e351
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tiptap/src/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ export default class Editor extends Emitter {

registerPlugin(plugin = null, handlePlugins) {
const plugins = typeof handlePlugins === 'function'
? handlePlugins(plugin, this.state.plugins) : [...plugin, this.state.plugins]
? handlePlugins(plugin, this.state.plugins)
: [plugin, ...this.state.plugins]
const newState = this.state.reconfigure({ plugins })
this.view.updateState(newState)
}
Expand Down

0 comments on commit 3e7e351

Please sign in to comment.