From 2e5c2fdd6cf5a24a65d4441594e1261bf9d0263e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 5 Dec 2024 18:39:58 +0200 Subject: [PATCH] web/polyfill: add missing semicolons --- web/src/util/polyfill.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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) {