fix parse type to always return Node #121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "parse-always-return-node"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The type for
parseis currentlybecause it uses
Node.createAndFill(). But becausecontentis always null, we can assumecreateAndFill()always returns aNode.github.com/ProseMirror/prosemirror-model@b71f73f193/src/schema.ts (L157-L169)Oh, indeed, that optional return type was entirely unintentional. Thanks for spotting it.