Skip to content

Commit

Permalink
fix: Fixed an issue with MSIE and no support for Number.isNaN
Browse files Browse the repository at this point in the history
  • Loading branch information
cure53 committed May 18, 2024
1 parent e1ddfc7 commit f3a9710
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 11 deletions.
5 changes: 4 additions & 1 deletion dist/purify.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.cjs.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/purify.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.es.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/purify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/purify.min.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ const regExpTest = unapply(RegExp.prototype.test);

const typeErrorCreate = unconstruct(TypeError);

const numberIsNaN = unapply(Number.isNaN);
export function numberIsNaN(x) {
// eslint-disable-next-line no-self-compare
return x !== x;
}

export function unapply(func) {
return (thisArg, ...args) => apply(func, thisArg, args);
Expand Down Expand Up @@ -157,8 +160,6 @@ export {
stringToLowerCase,
stringToString,
stringTrim,
// Number
numberIsNaN,
// Errors
typeErrorCreate,
// Other
Expand Down

0 comments on commit f3a9710

Please sign in to comment.