fix: make sure to only decode thumbhash once

This commit is contained in:
Max Richter
2025-11-03 00:57:44 +01:00
parent ebb897dca4
commit 28e9de4dc8

View File

@@ -229,8 +229,9 @@ function rgbaToDataURL(w, h, rgba) {
function updateThumbhashImages() { function updateThumbhashImages() {
document.querySelectorAll("[data-thumb]").forEach((entry) => { document.querySelectorAll("[data-thumb]").forEach((entry) => {
const hash = entry.getAttribute("data-thumb"); const hash = entry.getAttribute("data-thumb");
if (entry.getAttribute("data-thumb-decoded")) return;
if (!hash) return; if (!hash) return;
entry.setAttribute("data-thumb-decoded", true);
const decodedString = atob(hash); const decodedString = atob(hash);