bugfix in fighweel-bridge.js

Bug description:
figwheel-bridge tracks the js file evaluation and when /env/<platform>/main.js script is evaluated it means that all app code is loaded and can be started. But in case user code contains custom namespace called *.main, then figwheel-bridge interpret the evaluation of this namespace incorrectly and tries to start app too early.
This commit is contained in:
Artur Girenko 2016-01-27 21:42:07 +01:00
parent 922d1d60e1
commit eb969d8709
1 changed files with 2 additions and 1 deletions

View File

@ -163,8 +163,9 @@ function loadApp(platform, devHost, onLoadCb) {
});
// callback when app is ready to get the reloadable component
var mainJs = '/env/' + platform + '/main.js';
evalListeners.push(function (url) {
if (url.indexOf('main.js') > -1) {
if (url.indexOf(mainJs) > -1) {
onLoadCb(env[platform].main.root_el);
console.log('Done loading Clojure app');
}