From d1e0a7b1d7efe69ca8f2dadb972b72a7d4587c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Thu, 30 Dec 2021 21:46:52 +0100 Subject: [PATCH] handle multiple DOM nodes with same blurhash string --- src/components/images/imageLoader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/images/imageLoader.js b/src/components/images/imageLoader.js index 9d1c21d13..28dbf98ce 100644 --- a/src/components/images/imageLoader.js +++ b/src/components/images/imageLoader.js @@ -54,7 +54,8 @@ worker.addEventListener( // Lower values had more visible pixelation const width = 20; const height = 20; - targetDic[hash] = target; + targetDic[hash] = (targetDic[hash] || []).filter(item => item !== target); + targetDic[hash].push(target); worker.postMessage({ hash,