1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Move check outside of loop

This commit is contained in:
MrTimscampi 2020-06-30 00:10:13 +02:00
parent c70ba48082
commit 0766d360c1

View file

@ -119,9 +119,9 @@ import 'css!./style';
} }
export function lazyChildren(elem) { export function lazyChildren(elem) {
for (const lazyElem of elem.getElementsByClassName('lazy')) { if (userSettings.enableBlurhash()) {
if (userSettings.enableBlurhash()) { for (const lazyElem of elem.getElementsByClassName('lazy')) {
var blurhashstr = lazyElem.getAttribute('data-blurhash'); const blurhashstr = lazyElem.getAttribute('data-blurhash');
if (!lazyElem.classList.contains('blurhashed', 'non-blurhashable') && blurhashstr) { if (!lazyElem.classList.contains('blurhashed', 'non-blurhashable') && blurhashstr) {
itemBlurhashing(lazyElem, blurhashstr); itemBlurhashing(lazyElem, blurhashstr);
} else if (!blurhashstr && !lazyElem.classList.contains('blurhashed')) { } else if (!blurhashstr && !lazyElem.classList.contains('blurhashed')) {