mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Use Promise the way they are meant to be used
This commit is contained in:
parent
c97d0ab062
commit
986ea0691d
1 changed files with 4 additions and 4 deletions
|
|
@ -1136,10 +1136,10 @@ const webRequest = {
|
|||
vAPI.defer.once({ min: 1 }).then(( ) => {
|
||||
if ( vAPI.net.hasUnprocessedRequest() === false ) { return; }
|
||||
vAPI.net.removeUnprocessedRequest();
|
||||
vAPI.tabs.getCurrent().then(tab => {
|
||||
if ( tab === null ) { return; }
|
||||
µb.updateToolbarIcon(tab.id, 0b0110);
|
||||
});
|
||||
return vAPI.tabs.getCurrent();
|
||||
}).then(tab => {
|
||||
if ( tab instanceof Object === false ) { return; }
|
||||
µb.updateToolbarIcon(tab.id, 0b0110);
|
||||
});
|
||||
vAPI.net.unsuspend({ all: true });
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue