diff --git a/assets/src/js/app/layout.js b/assets/src/js/app/layout.js index a43d88e..d0401f7 100644 --- a/assets/src/js/app/layout.js +++ b/assets/src/js/app/layout.js @@ -15,9 +15,11 @@ window.progress = { import {bindAsync} from '../lib/async'; import initAsyncView from '../lib/asyncView'; - const initTheme = (await import('../lib/themeSelector')).initTheme; +window.loaded = false; function onLoad() { + if (window.loaded) return; + window.loaded = true; initTheme(document.querySelector('[data-toggle-theme]')); document.body.style.display = 'flex'; hideProgress();