Skip to content

Node.js based forum software built for the modern web

fix: acp dashboard sometimes not loading on cold load

Barış Soner Uşaklıfee782c43694
diff --git a/src/views/admin/footer.tpl b/src/views/admin/footer.tpl
index b28202d057..a9c4f30d48 100644
--- a/src/views/admin/footer.tpl
+++ b/src/views/admin/footer.tpl
@@ -9,11 +9,17 @@
<footer class="footer">Copyright &copy; 2015 <a target="_blank" href="https://nodebb.org">NodeBB</a> by <a target="_blank" href="https://github.com/psychobunny">psychobunny</a>, <a href="https://github.com/julianlam" target="_blank">julianlam</a>, <a href="https://github.com/barisusakli" target="_blank">barisusakli</a> from <a target="_blank" href="http://www.designcreateplay.com">designcreateplay</a></footer>
</div>
<script>
- window.addEventListener('DOMContentLoaded', function () {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', prepareFooter);
+ } else {
+ prepareFooter();
+ }
+
+ function prepareFooter() {
$(document).ready(function () {
app.coldLoad();
});
- });
+ }
</script>
</body>
</html>