v4
This commit is contained in:
@@ -27,7 +27,7 @@ export default function useLayoutInit() {
|
||||
// Destroy ALL existing swiper instances to prevent duplicates
|
||||
document.querySelectorAll('.swiper').forEach(el => {
|
||||
if (el.swiper) {
|
||||
try { el.swiper.destroy(true, true) } catch (e) {}
|
||||
try { el.swiper.destroy(true, true) } catch (e) { console.warn('useLayoutInit: swiper destroy failed:', e) }
|
||||
}
|
||||
})
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function useLayoutInit() {
|
||||
}
|
||||
rafId = requestAnimationFrame(poll)
|
||||
|
||||
// Fallback timeout (8 seconds)
|
||||
// Fallback timeout (3 seconds)
|
||||
const fallback = setTimeout(() => {
|
||||
if (!destroyed) {
|
||||
window.__layoutReady = true
|
||||
@@ -63,7 +63,7 @@ export default function useLayoutInit() {
|
||||
destroyed = true
|
||||
if (rafId) cancelAnimationFrame(rafId)
|
||||
}
|
||||
}, 8000)
|
||||
}, 3000)
|
||||
|
||||
return () => {
|
||||
destroyed = true
|
||||
|
||||
Reference in New Issue
Block a user