Fix default websites not checked in options (part 2)

Now both for new install and update of options.
This commit is contained in:
magnolia1234 2019-11-05 18:11:18 +01:00 committed by GitHub
parent 952eb70594
commit 20e3a04e8a

View File

@ -142,7 +142,7 @@ function renderOptions() {
inputEl.type = 'checkbox';
inputEl.dataset.key = key;
inputEl.dataset.value = value;
inputEl.checked = key.replace(/\s\(.*\)/, '') in sites;
inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites);
labelEl.appendChild(inputEl);
labelEl.appendChild(document.createTextNode(' '+key));