mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-08 01:53:04 +08:00
fix(core): allow unregistering multiple plugins (#6299)
This commit is contained in:
parent
eb4e97d5f2
commit
5de17c52f5
5
.changeset/lucky-bears-exercise.md
Normal file
5
.changeset/lucky-bears-exercise.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tiptap/core": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes a bug where you could not unregister multiple plugins.
|
@ -254,7 +254,7 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|||||||
const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key
|
const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
plugins = prevPlugins.filter(plugin => !plugin.key.startsWith(name))
|
plugins = plugins.filter(plugin => !plugin.key.startsWith(name))
|
||||||
})
|
})
|
||||||
|
|
||||||
if (prevPlugins.length === plugins.length) {
|
if (prevPlugins.length === plugins.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user