fix: fix a bug in detecting a current list in toggleList command

This commit is contained in:
Philipp Kühn
2021-05-13 14:43:27 +02:00
parent 7e174455d7
commit a35b2533eb

View File

@@ -18,7 +18,7 @@ declare module '@tiptap/core' {
export const toggleList: RawCommands['toggleList'] = (listTypeOrName, itemTypeOrName) => ({
editor, tr, state, dispatch, chain, commands, can,
}) => {
const { extensions } = editor.options
const { extensions } = editor.extensionManager
const listType = getNodeType(listTypeOrName, state.schema)
const itemType = getNodeType(itemTypeOrName, state.schema)
const { selection } = state