code-dot-org/code-dot-org — pull request #855 by Bjvanminnen (2014-12-12 18:10:29+00:00)
Title: wait until ready to load app

Looking at JS errors, I saw an interesting one where we're installing the flappy blocks. As part of this, we install some common blocks, at least one of which uses some code from Blockly.JavaScript.controls_repeat. The error implied that Blockly.JavaScript.controls_repeat was non-existent.

I believe what was happening is that we were getting to our block install before vendor.js was completely loaded - most likely due to the site slowness we've had a few times this past week. It doesn't seem like we should be loading our app until we're fully loaded. I'm not sure if there are drawbacks to waiting.

I probably want to test this further before committing, and may want to wait until things are less busy, but wanted to get this up for feedback.