From 27c58efbc79e8aff43761701f854309757d1faac Mon Sep 17 00:00:00 2001 From: Miner49ur <101815367+Miner49ur@users.noreply.github.com> Date: Tue, 17 Sep 2024 21:25:17 -0400 Subject: [PATCH] Update index.js --- payloads/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/payloads/index.js b/payloads/index.js index 3e3dc17..fa040ae 100644 --- a/payloads/index.js +++ b/payloads/index.js @@ -322,11 +322,11 @@ function updateExtensionStatus(extlist_element) { } ordlist.push(e); - const icon = e.icons.find((ic) => ic.size === 128) ?? e.icons.at(-1); + const icon = e.icons?.find((ic) => ic.size === 128) ?? e.icons?.at(-1); - let card = createExtensionCard(e.name, e.id, e.enabled, icon.url); + let card = createExtensionCard(e.name, e.id, e.enabled, icon?.url || ""); // add default image here - let cardInput = card.querySelector("input") + let cardInput = card.querySelector("input"); cardInput.addEventListener("change", (event) => { chrome.management.setEnabled(e.id, event.target.checked);