about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-04-07 07:03:42 -0400
committerGitHub <noreply@github.com>2023-04-07 13:03:42 +0200
commitc0886dee1480cecedb7e8b152c848f061ab7f81e (patch)
treee7e580da155c24b7b2b141e0089c1e18db95465e
parentd7b8c6db7ec4d9b3fe39cbf8f1b32d152e70b8f1 (diff)
Remove Array.prototype.includes polyfill (#24234)
-rw-r--r--app/javascript/mastodon/base_polyfills.js5
-rw-r--r--app/javascript/mastodon/load_polyfills.js1
-rw-r--r--package.json1
3 files changed, 0 insertions, 7 deletions
diff --git a/app/javascript/mastodon/base_polyfills.js b/app/javascript/mastodon/base_polyfills.js
index d3ac0d510..91bc5d6dc 100644
--- a/app/javascript/mastodon/base_polyfills.js
+++ b/app/javascript/mastodon/base_polyfills.js
@@ -1,16 +1,11 @@
 import 'intl';
 import 'intl/locale-data/jsonp/en';
 import 'es6-symbol/implement';
-import includes from 'array-includes';
 import assign from 'object-assign';
 import values from 'object.values';
 import { decode as decodeBase64 } from './utils/base64';
 import promiseFinally from 'promise.prototype.finally';
 
-if (!Array.prototype.includes) {
-  includes.shim();
-}
-
 if (!Object.assign) {
   Object.assign = assign;
 }
diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js
index b2c41303a..7909dc4ea 100644
--- a/app/javascript/mastodon/load_polyfills.js
+++ b/app/javascript/mastodon/load_polyfills.js
@@ -12,7 +12,6 @@ function importExtraPolyfills() {
 
 function loadPolyfills() {
   const needsBasePolyfills = !(
-    Array.prototype.includes &&
     HTMLCanvasElement.prototype.toBlob &&
     window.Intl &&
     Object.assign &&
diff --git a/package.json b/package.json
index eeee8e420..e36780396 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,6 @@
     "@github/webauthn-json": "^2.1.1",
     "@rails/ujs": "^6.1.7",
     "abortcontroller-polyfill": "^1.7.5",
-    "array-includes": "^3.1.6",
     "arrow-key-navigation": "^1.2.0",
     "autoprefixer": "^10.4.14",
     "axios": "^1.3.4",