svelte-jsoneditor
svelte-jsoneditor copied to clipboard
Parsing JSON with duplicate keys in onChange throws "RangeError: Selection points outside of document"
Hi, I ran into this with svelte + svelte-jsoneditor v0.17.9.
When pasting in JSON with duplicate keys, this error from codemirror gets thrown: Uncaught (in promise) RangeError: Selection points outside of document
. I noticed this started occurring on v0.17.9, but was not present on v0.17.8.
Minimal example to reproduce: https://www.sveltelab.dev/8u8l783v8eij2b1
To reproduce, paste
{"a":"a", "a":"b"}
into the editor. An error should be thrown in the console log. Thanks.