Fix a crash when lifting nested list #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ocavue/fix_lift_crash"
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?
Close https://github.com/ProseMirror/prosemirror/issues/1299
In the case above,
liftTargetwill returnnull, which shouldn't be passed totr.liftbecausetr.liftonly accept number.Before the JS=>TS update,
liftTargehere used to returnundefined.undefinedandnullhave different behavior when passed totr.lift. That's why we see this bug after the TS version.I'm not sure if my fix is the perfect solution. In particular, from a user view, I still hope
Mod-[can lift the nested item. But at least this patch fixes the crash.Yeah, that looks like a reasonable fix. Thanks!