Import validation extended (#92)

This commit is contained in:
nobody 2020-09-08 20:47:55 +02:00
parent 0491b1cfb9
commit 6a80106def
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
1 changed files with 3 additions and 1 deletions

View File

@ -139,8 +139,10 @@ storageManager._validation = function (content) {
imported[key] = storageManager._validateDomainsAndStatistics(key, content[key]);
} else if (typeof value === 'string' || value instanceof String) {
imported[key] = storageManager._validateStrings(content[key]);
} else if ((typeof value === 'number' || value instanceof Number) && key !== 'amountInjected') {
} else if (typeof value === 'number' || value instanceof Number) {
imported[key] = storageManager._validateNumbers(content[key]);
} else if (typeof value === 'boolean' || value instanceof Boolean) {
imported[key] = content[key];
}
} else {
alert(chrome.i18n.getMessage('dialogImportFailed'));