diff --git a/web/src/util/polyfill.js b/web/src/util/polyfill.js index 58099bd..c98c5d9 100644 --- a/web/src/util/polyfill.js +++ b/web/src/util/polyfill.js @@ -15,10 +15,7 @@ // along with this program. If not, see . if (!window.Iterator?.prototype.map) { - (new Map([])).keys().__proto__.map = function(callbackFn) { - if (!this) { - return [] - } + ;(new Map([])).keys().__proto__.map = function(callbackFn) { const output = [] let i = 0 for (const item of this) { @@ -27,10 +24,7 @@ if (!window.Iterator?.prototype.map) { } return output } - (new Map([])).keys().__proto__.filter = function(callbackFn) { - if (!this) { - return [] - } + ;(new Map([])).keys().__proto__.filter = function(callbackFn) { const output = [] let i = 0 for (const item of this) {