Take onlyOwnSites into account when updating

This commit is contained in:
Ilya Ig. Petrov 2017-09-15 19:41:58 +05:00
parent 5a4d52b0ad
commit e4dbdd3736

View File

@ -540,8 +540,10 @@
// UPDATE & MIGRATION // UPDATE & MIGRATION
console.log('Updating from ', oldStorage.version, 'to', antiCensorRu.version); console.log('Updating from ', oldStorage.version, 'to', antiCensorRu.version);
const key = antiCensorRu._currentPacProviderKey; const key = antiCensorRu._currentPacProviderKey;
if (key !== null) { if (oldStorage.version === ' 0.0.1.2') {
antiCensorRu._currentPacProviderKey = 'Антицензорити'; if (key !== null && key !== 'onlyOwnSites') {
antiCensorRu._currentPacProviderKey = 'Антицензорити';
}
} }
antiCensorRu.pushToStorageAsync(() => { antiCensorRu.pushToStorageAsync(() => {