Fix enabled update when toggled from popup

This commit is contained in:
Rob Garrison 2018-12-03 18:53:33 -06:00
parent 529172de5b
commit bc404e821f

View File

@ -318,7 +318,7 @@ function handleUpdate(style, {reason, method} = {}) {
if (diff.length === 1 && diff[0].key === 'enabled') { if (diff.length === 1 && diff[0].key === 'enabled') {
oldEntry.classList.toggle('enabled', style.enabled); oldEntry.classList.toggle('enabled', style.enabled);
oldEntry.classList.toggle('disabled', !style.enabled); oldEntry.classList.toggle('disabled', !style.enabled);
$$('.checker', oldEntry).forEach(el => (el.checked = style.enabled)); $$('.entry-state-toggle', oldEntry).forEach(el => (el.checked = style.enabled));
oldEntry.styleMeta = newStyleMeta; oldEntry.styleMeta = newStyleMeta;
entry = oldEntry; entry = oldEntry;
oldEntry = null; oldEntry = null;