Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Miner49ur authored Sep 18, 2024
1 parent 841e4ca commit 27c58ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions payloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 27c58ef

Please sign in to comment.