-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed nodesBetween when child is undefinded bug #33
base: master
Are you sure you want to change the base?
Conversation
Could it be that something was calling the method with a |
I think the problem is that the positions that |
Could ProseMirror perhaps output a different error message if the |
Raising an explicit error would be fine by me. Do you want to create a pull request? |
I have also run into the bug in two separate instances. One of the cases is when trying to remove more than one row or column in a table. I had a slightly different solution but I think either would work. My solution adds an extra end case to the for loop: for (let i = 0, pos = 0; pos < to && i < this.content.length; i++) { I am happy to create a PR if you would like to see a different solution. |
@anarchang I'm not sure which code that line is from, and what problem you're addressing. |
@marijnh could we merge this PR? It would be useful to raise an explicit error when |
No. I don't want to paper over stuff that's going wrong elsewhere by silently ignoring it here. |
Ok, I understand. Could we at least raise an exception so that we can catch it elsewhere? I know it was a while ago, but you wrote
|
I came across a situation where the child node is undefined.