mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-08-04 21:10:40 +02:00
clean empty per site settings
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user