From 4409faf66a034bc1cf720479b298064ee5fe3107 Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 2 Feb 2026 23:16:11 +0100 Subject: [PATCH] skipping input without id when restoring options. see #603 --- options/mzta-options.js | 1 + pages/addtags/mzta-add-tags.js | 1 + pages/spamfilter/mzta-spamfilter.js | 1 + pages/summarize/mzta-summarize.js | 1 + 4 files changed, 4 insertions(+) diff --git a/options/mzta-options.js b/options/mzta-options.js index 10d09874..09dd58bb 100644 --- a/options/mzta-options.js +++ b/options/mzta-options.js @@ -75,6 +75,7 @@ function saveOptions(e) { async function restoreOptions() { function setCurrentChoice(result) { document.querySelectorAll(".option-input").forEach(element => { + if(!element.id) return; taLog.log("Options restoring " + element.id + " = " + (isAPIKeyValue(element.id) ? "****************" : result[element.id])); switch (element.type) { case 'checkbox': diff --git a/pages/addtags/mzta-add-tags.js b/pages/addtags/mzta-add-tags.js index c2a20275..421c9e20 100644 --- a/pages/addtags/mzta-add-tags.js +++ b/pages/addtags/mzta-add-tags.js @@ -301,6 +301,7 @@ function saveOptions(e) { async function restoreOptions() { function setCurrentChoice(result) { document.querySelectorAll(".option-input").forEach(element => { + if(!element.id) return; taLog.log("Options restoring " + element.id + " = " + (isAPIKeyValue(element.id) ? "****************" : result[element.id])); switch (element.type) { case 'checkbox': diff --git a/pages/spamfilter/mzta-spamfilter.js b/pages/spamfilter/mzta-spamfilter.js index a40cbe21..49b28dce 100644 --- a/pages/spamfilter/mzta-spamfilter.js +++ b/pages/spamfilter/mzta-spamfilter.js @@ -290,6 +290,7 @@ function saveOptions(e) { async function restoreOptions() { function setCurrentChoice(result) { document.querySelectorAll(".option-input").forEach(element => { + if(!element.id) return; taLog.log("Options restoring " + element.id + " = " + (isAPIKeyValue(element.id) ? "****************" : result[element.id])); switch (element.type) { case 'checkbox': diff --git a/pages/summarize/mzta-summarize.js b/pages/summarize/mzta-summarize.js index b1006d56..1cac274a 100644 --- a/pages/summarize/mzta-summarize.js +++ b/pages/summarize/mzta-summarize.js @@ -210,6 +210,7 @@ function saveOptions(e) { async function restoreOptions() { function setCurrentChoice(result) { document.querySelectorAll(".option-input").forEach(element => { + if(!element.id) return; taLog.log("Options restoring " + element.id + " = " + (isAPIKeyValue(element.id) ? "****************" : result[element.id])); switch (element.type) { case 'checkbox':