1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Fix babel

This commit is contained in:
Jorik Schellekens
2020-07-21 10:40:02 +01:00
parent 72675f7266
commit 8a974172ab

View File

@@ -392,7 +392,7 @@ export function runPolyfills() {
// SOURCE:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
if (!Array.prototype.filter) {
Array.prototype.filter = function(fun: Function, thisArg?: any) {
Array.prototype.filter = function(fun: Function/*, thisArg*/, ...restProps) {
if (this === void 0 || this === null) {
throw new TypeError();
}
@@ -404,7 +404,7 @@ export function runPolyfills() {
}
const res = [];
const thisArg = thisArg ? thisArg : void 0;
const thisArg = restProps ? restProps[0] : void 0;
for (let i = 0; i < len; i++) {
if (i in t) {
const val = t[i];