mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-27 23:55:52 +00:00
[Glitch] Fix old browsers crashing because of missing finally
polyfill in web UI
Port 1314bba68a
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
e037002401
commit
c9166a5943
|
@ -6,6 +6,7 @@ import assign from 'object-assign';
|
|||
import values from 'object.values';
|
||||
import isNaN from 'is-nan';
|
||||
import { decode as decodeBase64 } from './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,';
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue