mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Use Promise the way they are meant to be used
This commit is contained in:
parent
c97d0ab062
commit
986ea0691d
@ -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 New Issue
Block a user