TypeError null is not an object / cannot read properties of null

Hi!

I see the exceptions (images below) happen using code mirror 6 (v6.0.0), lezer/common (v1.0.0), lezer/highlight (v1.0.0). The errors seem to occur on Chrome (v103, v104) and Safari (various versions of v15).

We have randomly reproduced the issue a handful of times, but there were no clear steps. The times we were able to reproduce, we were frantically clicking around the editor instance. Would you have any ideas where this issue may be stemming from? It’s causing a lot of noise in our error monitoring tool and would like to get to the root of the problem.

Thanks!

A stack trace from a minified build is, unfortunately, not really any use for figuring out what this may be about.