You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app.js must be fully loaded before init() can be called. If it isn't, then there'll be an Reference Error (because the necessary js just isn't loaded yet). And yet the current code doesn't guarantee this fully-loaded-before-call requirement.
The solution is easy - change the script part to be:
<script>
window.onload = function () {
{{sanitized}}.core.init();
}
</script>
Now init() doesn't happen before app.js is fully loaded.
So ...
I'm completely shocked that this hasn't come up before now. How has this not failed all the time before now? I'm Baffled. I must be missing something - which accounts for me not doing a PR. (Was just reported as a problem in Clojurians)
The text was updated successfully, but these errors were encountered:
I believe there's a race condition in the way the application bootstrap is written:
https://github.com/Day8/re-frame-template/blob/master/src/leiningen/new/re_frame/resources/public/index.html#L15-L16
app.js
must be fully loaded beforeinit()
can be called. If it isn't, then there'll be an Reference Error (because the necessaryjs
just isn't loaded yet). And yet the current code doesn't guarantee this fully-loaded-before-call requirement.The solution is easy - change the script part to be:
Now
init()
doesn't happen beforeapp.js
is fully loaded.So ...
I'm completely shocked that this hasn't come up before now. How has this not failed all the time before now? I'm Baffled. I must be missing something - which accounts for me not doing a PR. (Was just reported as a problem in Clojurians)
The text was updated successfully, but these errors were encountered: