Improved: Settings with old values

This commit is contained in:
nobody 2020-11-21 07:02:33 +01:00
parent de4b23a129
commit bb7a90cd37
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ main._initializeSettings = function () {
storageManager.type.get(null, function (items) {
// Delete old keys
if (typeof items.whitelistedDomains !== 'undefined') {
if (Object.keys(items.allowlistedDomains).length === 0) {
items.allowlistedDomains = items.whitelistedDomains;
if (items.allowlistedDomains === 'undefined' || Object.keys(items.allowlistedDomains).length === 0) {
items['allowlistedDomains'] = items.whitelistedDomains;
}
delete items['whitelistedDomains'];
storageManager.type.remove('whitelistedDomains');