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

Fix #8561: Fix issue with stats script sending empty image sources #8559

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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