diff --git a/packages/tiptap-commands/src/commands/toggleList.js b/packages/tiptap-commands/src/commands/toggleList.js index df8bc1c2..8d71b73f 100644 --- a/packages/tiptap-commands/src/commands/toggleList.js +++ b/packages/tiptap-commands/src/commands/toggleList.js @@ -23,7 +23,7 @@ export default function toggleList(listType, itemType) { return liftListItem(itemType)(state, dispatch, view) } - if (isList(parentList.node, schema)) { + if (isList(parentList.node, schema) && listType.validContent(parentList.node.content)) { const { tr } = state tr.setNodeMarkup(parentList.pos, listType) if (dispatch) dispatch(tr)