clean empty per site settings

This commit is contained in:
2026-07-07 14:16:13 +02:00
parent ddcb13013a
commit 71593f6762
3 changed files with 16 additions and 1 deletions
+8
View File
@@ -108,4 +108,12 @@ export class PerDomainSettings {
delete val[domain];
return val;
});
static cleanEmpty = () =>
this.storage.update((val) => {
for (const [domain, settings] of Object.entries(val)) {
if (!settings.allDisabled && settings.disabledHostIds.length === 0) delete val[domain];
}
return val;
});
}