krisk / Fuse

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

Score return NaN on IE11 #472

Closed mt-rory closed 4 years ago

mt-rory commented 4 years ago

Describe the bug

Screen Shot 2020-07-28 at 15 11 15

As you see from the above screenshot, the return value of the search function got the score: NaN on the browser Internet Explorer 11. After investigating the codebase, I think Number.EPSILON cause this bug. https://github.com/krisk/Fuse/blob/6c76f5241a62bf50085e066f71bc68f1b4d1868f/src/core/index.js#L298

Version

v6.4.1

ghost commented 4 years ago

I am also seeing syntax errors in IE11 and if you look at the support for Number.EPSILON as @mt-rory suggested it is not supported for Internet Explorer: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON

Seems that the last stable build I can get IE11 to work with is "3.6.1"

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

ghost commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Please don't close