From 3e7e351f939eb279d7b061089d1cdd9479debf1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 12 Apr 2020 19:22:24 +0200 Subject: [PATCH] fix bug --- packages/tiptap/src/Editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tiptap/src/Editor.js b/packages/tiptap/src/Editor.js index 97e630d35..6e80fae64 100644 --- a/packages/tiptap/src/Editor.js +++ b/packages/tiptap/src/Editor.js @@ -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) }