Skip to content

Commit

Permalink
Update src/background/adblocker.js
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Claßen <[email protected]>
  • Loading branch information
chrmod and philipp-classen authored Nov 19, 2024
1 parent df1d53b commit fee3f0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/background/adblocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ const contentScripts = (() => {
},
delete(key) {
const contentScript = map.get(key);
contentScript.unregister();
map.delete(key);
if (contentScript) {
contentScript.unregister();
map.delete(key);
}
},
clear() {
for (const key of map.keys()) {
Expand Down

0 comments on commit fee3f0f

Please sign in to comment.