about summary refs log tree commit diff
diff options
context:
space:
mode:
-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, 7 insertions, 0 deletions
diff --git a/app/javascript/mastodon/base_polyfills.js b/app/javascript/mastodon/base_polyfills.js
index 7856b26f9..8fbb17785 100644
--- a/app/javascript/mastodon/base_polyfills.js
+++ b/app/javascript/mastodon/base_polyfills.js
@@ -3,6 +3,7 @@ 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 isNaN from 'is-nan';
 
 if (!Array.prototype.includes) {
@@ -13,6 +14,10 @@ if (!Object.assign) {
   Object.assign = assign;
 }
 
+if (!Object.values) {
+  values.shim();
+}
+
 if (!Number.isNaN) {
   Number.isNaN = isNaN;
 }
diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js
index 8927b7358..815e1905b 100644
--- a/app/javascript/mastodon/load_polyfills.js
+++ b/app/javascript/mastodon/load_polyfills.js
@@ -14,6 +14,7 @@ function loadPolyfills() {
   const needsBasePolyfills = !(
     window.Intl &&
     Object.assign &&
+    Object.values &&
     Number.isNaN &&
     window.Symbol &&
     Array.prototype.includes
diff --git a/package.json b/package.json
index fc8e2425e..33853516b 100644
--- a/package.json
+++ b/package.json
@@ -71,6 +71,7 @@
     "npmlog": "^4.1.2",
     "object-assign": "^4.1.1",
     "object-fit-images": "^3.2.3",
+    "object.values": "^1.0.4",
     "offline-plugin": "^4.8.3",
     "path-complete-extname": "^0.1.0",
     "pg": "^6.4.0",