Don't register listeners for an autosave setting, if they've already been registered

This commit is contained in:
cmdr2 2022-11-30 15:45:30 +05:30
parent cc31110bcf
commit 4348333497

View File

@ -56,6 +56,9 @@ async function initSettings() {
if (!element) { if (!element) {
console.error(`Missing settings element ${id}`) console.error(`Missing settings element ${id}`)
} }
if (id in SETTINGS) { // don't create it again
return
}
SETTINGS[id] = { SETTINGS[id] = {
key: id, key: id,
element: element, element: element,