Fix race conditions that could prevent applications from being loaded

This commit is contained in:
yflory
2016-10-05 11:19:18 +02:00
parent 7d5a33512a
commit 74df38f94f
2 changed files with 26 additions and 9 deletions

View File

@@ -557,7 +557,20 @@ define([
Store.ready(function (err, store) {
common.store = env.store = store;
cb();
$(function() {
if($('#pad-iframe').length) {
var $iframe = $('#pad-iframe');
var iframe = $iframe[0];
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
if (iframeDoc.readyState === 'complete') {
cb();
return;
}
$iframe.load(cb);
return;
}
cb();
});
return;
/*
authorize(function (err, proxy) {