Skip to content

Commit

Permalink
🐛 remove unnecessary setImmediate method (#3166)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRoot-github authored Apr 2, 2023
1 parent 76173ef commit 9491957
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/adblocker-electron-preload/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ function getCosmeticsFiltersFirst(): string[] | null {
return ipcRenderer.sendSync('get-cosmetic-filters-first', window.location.href);
}
function getCosmeticsFiltersUpdate(data: Omit<IBackgroundCallback, 'lifecycle'>) {
setImmediate(() => {
ipcRenderer.send('get-cosmetic-filters', window.location.href, data);
});
ipcRenderer.send('get-cosmetic-filters', window.location.href, data);
}

if (window === window.top && window.location.href.startsWith('devtools://') === false) {
Expand Down

0 comments on commit 9491957

Please sign in to comment.