From 66f440a2a34a9bd7830362d79c5a5d0c0e4a8e7e Mon Sep 17 00:00:00 2001 From: MxtOUT <14999077+MxtOUT@users.noreply.github.com> Date: Sun, 4 Aug 2019 22:14:52 +0200 Subject: [PATCH 1/2] Fix not converting NodeList to Array --- js/content/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/content/store.js b/js/content/store.js index 52a6bb506..1afd1cc6b 100644 --- a/js/content/store.js +++ b/js/content/store.js @@ -32,7 +32,7 @@ class Customizer { let elements; if (typeof targets === "string") { - elements = document.querySelectorAll(targets); + elements = Array.from(document.querySelectorAll(targets)); } else if (targets instanceof NodeList) { elements = Array.from(targets); } else { From d47e964d01c85d2cc6f38d860b043de72d65784a Mon Sep 17 00:00:00 2001 From: MxtOUT <14999077+MxtOUT@users.noreply.github.com> Date: Sun, 4 Aug 2019 22:18:19 +0200 Subject: [PATCH 2/2] Check result object for existence of keys --- js/background/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/background/background.js b/js/background/background.js index d7b675925..09dbb1ee9 100644 --- a/js/background/background.js +++ b/js/background/background.js @@ -421,8 +421,8 @@ class SteamCommunity extends Api { result = await SteamCommunity.getEndpoint(`/inventory/${login.steamId}/753/${contextId}`, thisParams); if (result && result.success) { if (!data) data = { "assets": [], "descriptions": [] }; - data.assets = data.assets.concat(result.assets); - data.descriptions = data.descriptions.concat(result.descriptions); + if (result.assets) data.assets = data.assets.concat(result.assets); + if (result.descriptions) data.descriptions = data.descriptions.concat(); } last_assetid = result.last_assetid; } while (result.more_items);