diff options
author | ThibG <thib@sitedethib.com> | 2020-02-18 17:22:44 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 04:28:42 -0600 |
commit | bbbbfbc1a25496bb8fb53a1eb5027332664a14ca (patch) | |
tree | 6a8dc35b59aabe9fec9f6e3e6df3f9fd60a4a164 /app | |
parent | b3bde7bdc32806add6bf073403cf31f0872ea338 (diff) |
port glitch-soc#13115 to monsterfork Fix old browsers crashing because of missing `finally` polyfill in web UI
Fix #13015
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/base_polyfills.js | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/load_polyfills.js | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/base_polyfills.js b/app/javascript/mastodon/base_polyfills.js index 997813a04..12096d902 100644 --- a/app/javascript/mastodon/base_polyfills.js +++ b/app/javascript/mastodon/base_polyfills.js @@ -6,6 +6,7 @@ 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'; if (!Array.prototype.includes) { includes.shim(); @@ -23,6 +24,8 @@ if (!Number.isNaN) { Number.isNaN = isNaN; } +promiseFinally.shim(); + if (!HTMLCanvasElement.prototype.toBlob) { const BASE64_MARKER = ';base64,'; diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js index 8cb81c1a6..73eedc9dc 100644 --- a/app/javascript/mastodon/load_polyfills.js +++ b/app/javascript/mastodon/load_polyfills.js @@ -18,7 +18,8 @@ function loadPolyfills() { Number.isNaN && Object.assign && Object.values && - window.Symbol + window.Symbol && + Promise.prototype.finally ); // Latest version of Firefox and Safari do not have IntersectionObserver. |