Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8561: Fix issue with stats script sending empty image sources (#…
Browse files Browse the repository at this point in the history
…8559)

Fix issue with stats script sending empty image sources
  • Loading branch information
cuba committed Dec 14, 2023
1 parent eed715d commit 8dbb193
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ window.__firefox__.execute(function($) {
// If this `Image` instance fails to load, we can assume
// it has been blocked.
this._tpErrorHandler = $(function() {
// We don't need to send it if the src is set to ""
// (which will give us `window.location.href`)
if (this.src === window.location.href) { return }
sendMessage(this.src, "image");
});
this.addEventListener("error", this._tpErrorHandler);
Expand Down

0 comments on commit 8dbb193

Please sign in to comment.