1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
Guillermo Tomás Fernández Martín 2025-03-30 11:01:13 -04:00 committed by GitHub
commit 5dcebebf5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,8 +37,11 @@ class Backdrop {
parent.appendChild(backdropImage);
if (!enableAnimation()) {
if (existingBackdropImage?.parentNode) {
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
if (existingBackdropImage) {
const backdropContainer = getBackdropContainer();
while (backdropContainer.childNodes.length > 1) {
backdropContainer.removeChild(backdropContainer.firstChild);
}
}
internalBackdrop(true);
return;
@ -51,8 +54,11 @@ class Backdrop {
if (backdropImage === self.currentAnimatingElement) {
self.currentAnimatingElement = null;
}
if (existingBackdropImage?.parentNode) {
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
if (existingBackdropImage) {
const backdropContainer = getBackdropContainer();
while (backdropContainer.childNodes.length > 1) {
backdropContainer.removeChild(backdropContainer.firstChild);
}
}
};