mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Handle source properly in fillImage
This commit is contained in:
parent
58d9037986
commit
e256e64e68
1 changed files with 7 additions and 2 deletions
|
@ -20,10 +20,11 @@ import 'css!./style';
|
|||
throw new Error('entry cannot be null');
|
||||
}
|
||||
|
||||
var source = undefined;
|
||||
if (entry.target) {
|
||||
var source = entry.target.getAttribute('data-src');
|
||||
source = entry.target.getAttribute('data-src');
|
||||
} else {
|
||||
var source = entry;
|
||||
source = entry;
|
||||
}
|
||||
|
||||
if (entry.intersectionRatio > 0 && source) {
|
||||
|
@ -34,6 +35,10 @@ import 'css!./style';
|
|||
}
|
||||
|
||||
function fillImageElement(elem, url) {
|
||||
if (url === undefined) {
|
||||
throw new Error('url cannot be undefined');
|
||||
}
|
||||
|
||||
let preloaderImg = new Image();
|
||||
preloaderImg.src = url;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue