mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-14 18:49:02 +08:00
fix bug
This commit is contained in:
parent
9bf8be403f
commit
3e7e351f93
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user