Skip to content

Commit

Permalink
fix(content): ignore non-monetization links when <link> removed (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Oct 1, 2024
1 parent b2c1cd6 commit 19f59c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/services/monetizationLinkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ export class MonetizationLinkManager extends EventEmitter {

for (const record of records) {
if (record.type === 'childList') {
record.removedNodes.forEach(async (node) => {
record.removedNodes.forEach((node) => {
if (!(node instanceof HTMLLinkElement)) return;
if (!this.monetizationLinks.has(node)) return;
const payloadEntry = this.onRemovedLink(node);
stopMonetizationPayload.push(payloadEntry);
});
Expand Down

0 comments on commit 19f59c9

Please sign in to comment.