about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-03-08 21:07:25 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-03-08 13:07:25 +0100
commit188aa3ea50799f4a81f28416fe47b3330091ef6f (patch)
treec50f24a4e383cb23ec371dbe75e75bf3471ca41c /app/javascript
parentbd077ad7d9633a4ef1415aa123c7ecf54e829ae8 (diff)
Add polyfill for Object.values (#6697)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/base_polyfills.js5
-rw-r--r--app/javascript/mastodon/load_polyfills.js1
2 files changed, 6 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