From bfa6b0bdaec07ad89d974069f3991be27e670f45 Mon Sep 17 00:00:00 2001 From: Bast <52266665+bast0006@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:12:04 -0700 Subject: [PATCH] Fix infinite onerror loop in avatar image loader Avatar images have an onerror attribute to set their image to a generic avatar image if they fail to load from discord. However, in situations where the network fails or the discord CDN is unavailable for some reason (adblockers), this will throw an error as well. In browsers other than chrome, this will trigger the on-error handler again, infinitely looping requests as fast as possible. We set the onerror handler to null before making the new request to get around this and ensure if the fallback fails to load we don't make further requests. Signed-off-by: Bast <52266665+bast0006@users.noreply.github.com> --- templates/logbase.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/logbase.html b/templates/logbase.html index 17e8e8d..d1b9062 100644 --- a/templates/logbase.html +++ b/templates/logbase.html @@ -41,7 +41,7 @@