From 7119dcad127ec0b82ed82d3e7738d1b8a43d80b3 Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Thu, 5 Oct 2023 01:21:45 -0600 Subject: [PATCH] Update qrcode.js --- javascript/qrcode.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/javascript/qrcode.js b/javascript/qrcode.js index cea0e08..36db8ef 100644 --- a/javascript/qrcode.js +++ b/javascript/qrcode.js @@ -73,11 +73,7 @@ async function sendToControlnet(img, tab, index) { function setImage(input, list) { try { - if (input.previousElementSibling && - input.previousElementSibling.previousElementSibling && - input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']")) { - input.previousElementSibling.previousElementSibling.querySelector("button[aria-label='Clear']").click() - } + input.previousElementSibling?.previousElementSibling?.querySelector("button[aria-label='Clear']")?.click() } catch (e) { console.error(e) }