diff --git a/editor/js/editor-libs/events.js b/editor/js/editor-libs/events.js index d19cea7a8..3ac1c67b9 100644 --- a/editor/js/editor-libs/events.js +++ b/editor/js/editor-libs/events.js @@ -55,7 +55,7 @@ function addPostMessageListener() { ); } -document.addEventListener("readystatechange", function () { +document.addEventListener("DOMContentLoaded", function () { const theme = localStorage.getItem("theme"); if (theme !== null) { document.querySelector("body").classList.add("theme-" + theme);