mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-01-22 23:40:39 +01:00
Set default if a configuration element is missing (#92)
This commit is contained in:
parent
6a80106def
commit
e2536dff2e
@ -144,6 +144,9 @@ storageManager._validation = function (content) {
|
||||
} else if (typeof value === 'boolean' || value instanceof Boolean) {
|
||||
imported[key] = content[key];
|
||||
}
|
||||
} else if (content[key] === undefined) {
|
||||
// Set default if not existing in file
|
||||
imported[key] = value;
|
||||
} else {
|
||||
alert(chrome.i18n.getMessage('dialogImportFailed'));
|
||||
throw 'Invalid file!';
|
||||
|
Loading…
Reference in New Issue
Block a user