Skip to content
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

Add null check in a while loop #10

Closed
wants to merge 1 commit into from

Conversation

fuermosi777
Copy link

If next is null then rm() will throw an unhandled error when it tries to get the nextSibiling of the dom. This may resolve https://discuss.codemirror.net/t/defaulthighlightstyle-and-markdown-cause-ime-error-when-atomic-widget-presents/3385

To avoid this error
```
index.js:459 Uncaught TypeError: Cannot read property 'nextSibling' of null
    at rm (index.js:459)
    at syncNodeInto (index.js:467)
    at LineView.sync (index.js:317)
    at LineView.sync (index.js:1245)
    at DocView.sync (index.js:329)
    at eval (index.js:1913)
    at DOMObserver.ignore (index.js:4976)
    at DocView.updateInner (index.js:1901)
    at DocView.update (index.js:1892)
    at EditorView.update (index.js:5503)
```
@marijnh
Copy link
Member

marijnh commented Aug 20, 2021

Closing on the assumption that the underlying issue is now fixed.

@marijnh marijnh closed this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants