s/cb/await

This commit is contained in:
Ilya Ig. Petrov 2017-11-01 13:47:29 +05:00
parent 558d67204b
commit ec692851d4

View File

@ -511,7 +511,7 @@
Better on each launch then on each pull. Better on each launch then on each pull.
*/ */
await new Promise((resolve) => { await new Promise(async (resolve) => {
const ifUpdating = antiCensorRu.version !== oldStorage.version; const ifUpdating = antiCensorRu.version !== oldStorage.version;
if (!ifUpdating) { if (!ifUpdating) {
@ -539,11 +539,12 @@
const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n'); const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n');
const modsMutated = window.apis.pacKitchen.getPacModsRaw(); const modsMutated = window.apis.pacKitchen.getPacModsRaw();
modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']); modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']);
window.apis.pacKitchen.keepCookedNowAsync(modsMutated, ifUpdatedCb); await new Promise(
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
);
} else {
ifUpdatedCb();
} }
ifUpdatedCb();
}); });