From b46125224c26bc0144659b4319ea416b01289961 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 23 Mar 2023 04:47:13 -0400 Subject: [PATCH] Remove isNaN polyfill (#24224) --- app/javascript/mastodon/base_polyfills.js | 5 ----- app/javascript/mastodon/load_polyfills.js | 1 - package.json | 1 - yarn.lock | 8 -------- 4 files changed, 15 deletions(-) diff --git a/app/javascript/mastodon/base_polyfills.js b/app/javascript/mastodon/base_polyfills.js index 12096d902..d3ac0d510 100644 --- a/app/javascript/mastodon/base_polyfills.js +++ b/app/javascript/mastodon/base_polyfills.js @@ -4,7 +4,6 @@ import 'es6-symbol/implement'; import includes from 'array-includes'; import assign from 'object-assign'; import values from 'object.values'; -import isNaN from 'is-nan'; import { decode as decodeBase64 } from './utils/base64'; import promiseFinally from 'promise.prototype.finally'; @@ -20,10 +19,6 @@ if (!Object.values) { values.shim(); } -if (!Number.isNaN) { - Number.isNaN = isNaN; -} - promiseFinally.shim(); if (!HTMLCanvasElement.prototype.toBlob) { diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js index f5a897f75..b2c41303a 100644 --- a/app/javascript/mastodon/load_polyfills.js +++ b/app/javascript/mastodon/load_polyfills.js @@ -15,7 +15,6 @@ function loadPolyfills() { Array.prototype.includes && HTMLCanvasElement.prototype.toBlob && window.Intl && - Number.isNaN && Object.assign && Object.values && window.Symbol && diff --git a/package.json b/package.json index 247fe66ab..ed9f72e8c 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "intl": "^1.2.5", "intl-messageformat": "^2.2.0", "intl-relativeformat": "^6.4.3", - "is-nan": "^1.3.2", "js-yaml": "^4.1.0", "jsdom": "^21.1.1", "lodash": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index d09efa23b..3d6379246 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6108,14 +6108,6 @@ is-module@^1.0.0: resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= -is-nan@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150"