fixed nodesBetween when child is undefinded bug#33
fixed nodesBetween when child is undefinded bug#33XuXuDev wants to merge 1 commit intoProseMirror:masterfrom
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.