mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 11:53:44 +03:00
Move promise rejection handler into later promise. Fix #74
This commit is contained in:
parent
5287510263
commit
c8e7d7f427
|
@ -282,7 +282,7 @@
|
|||
handlers.mayNotify(
|
||||
noCon,
|
||||
chrome.i18n.getMessage('noControl'),
|
||||
chrome.i18n.getMessage('which'),
|
||||
chrome.i18n.getMessage('WhichQ'),
|
||||
{icon: 'no-control-128.png', ifSticky: false}
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -190,18 +190,12 @@
|
|||
() => new Promise(
|
||||
(resolve, reject) => httpLib.get(
|
||||
url,
|
||||
(newErr, pacData) => newErr ? reject(newErr) : resolve(pacData),
|
||||
(newErr, pacData) =>
|
||||
newErr ? reject(newErr) : resolve(pacData),
|
||||
),
|
||||
),
|
||||
),
|
||||
Promise.reject(),
|
||||
)
|
||||
.catch(
|
||||
clarifyThen(
|
||||
chrome.i18n.getMessage('FailedToDownloadPacScriptFromAddresses') + ': [ '
|
||||
+ provider.pacUrls.join(' , ') + ' ].',
|
||||
cb,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -215,6 +209,11 @@
|
|||
),
|
||||
);
|
||||
},
|
||||
clarifyThen(
|
||||
chrome.i18n.getMessage('FailedToDownloadPacScriptFromAddresses') + ': [ '
|
||||
+ provider.pacUrls.join(' , ') + ' ].',
|
||||
cb,
|
||||
),
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user