Editor crashes when you try to list a list
When you create list, if you then have the entire list selected and click the list button again, the editor crashes.
TypeError: Cannot read property 'type' of undefined
canSplit
src/wax-default/node_modules/prosemirror-transform/dist/index.es.js:789
786 | }
787 | var index = $pos.indexAfter(base);
788 | var baseType = typesAfter && typesAfter[0];
> 789 | return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type)
790 | }
791 |
792 | // :: (number, ?number, ?[?{type: NodeType, attrs: ?Object}]) → this
Expected behaviour:
- either it nests the list (which it does if only a single item of the list is selected)
- or it disables the list, i.e. converts it back into paragraphs
- or it disables the button if the action is invalid
I imagine lists are pretty difficult :)