From af8bb01fca45b939a9277946e19fe71a939f26ae Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Mon, 29 Jul 2024 10:17:20 +0200 Subject: [PATCH] Use document.readyState !== 'complete' to be sure startObserving is always executed --- src/assets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets.js b/src/assets.js index 08b233b74..37b5c6255 100644 --- a/src/assets.js +++ b/src/assets.js @@ -360,7 +360,7 @@ function startObserving() { } // Wait for the DOM to be fully loaded before starting the observer -if (document.readyState === 'loading') { +if (document.readyState !== 'complete') { document.addEventListener('DOMContentLoaded', startObserving); } else { // DOMContentLoaded has already fired