Fix slides container initialization to create a dummy element if not present
This commit is contained in:
@@ -3901,8 +3901,16 @@ const slidesInit = async () => {
|
|||||||
homeSections.style.top = '0';
|
homeSections.style.top = '0';
|
||||||
homeSections.style.marginTop = '0';
|
homeSections.style.marginTop = '0';
|
||||||
}
|
}
|
||||||
const container = document.getElementById('slides-container');
|
let container = document.getElementById('slides-container');
|
||||||
if (container) container.style.display = 'none';
|
if (container) {
|
||||||
|
container.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
// Create dummy container so loading screen's interval can trigger its own cleanup
|
||||||
|
container = document.createElement('div');
|
||||||
|
container.id = 'slides-container';
|
||||||
|
container.style.display = 'none';
|
||||||
|
document.body.appendChild(container);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user