1
0
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:
Raymond Hill 2023-04-13 15:03:19 -04:00
parent c97d0ab062
commit 986ea0691d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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 });
};