krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.05k stars 766 forks source link

fix(index): add workaround for js parsing error in edge #475

Closed LennartSpitzner closed 2 years ago

LennartSpitzner commented 4 years ago

On pre-chromium-based edge versions using fuse.js lead to an error "Expected identifier, string or number" around the two expressions that get touched in this PR. Slightly rewriting it using Object.assign seems to work around the problem without any known downsides.

See https://github.com/krisk/Fuse/issues/445 which reports a very similar error. I was not able to apply the workaround that gets suggested in that thread.