Fix race conditon

pull/1/head
yflory 8 years ago
parent 94417d9a8b
commit dd014f6ef2

@ -16,11 +16,12 @@ define([
var $ = window.jQuery;
var saveAs = window.saveAs;
var $iframe = $('#pad-iframe').contents();
var ifrw = $('#pad-iframe')[0].contentWindow;
// Use `$(function () {});` to make sure the html is loaded before doing anything else
$(function () {
var $iframe = $('#pad-iframe').contents();
var ifrw = $('#pad-iframe')[0].contentWindow;
Cryptpad.addLoadingScreen();
var onConnectError = function (info) {
@ -2032,5 +2033,5 @@ define([
}
});
});
});

@ -39,7 +39,6 @@ define([
} else {
$main.find('#userForm').removeClass('hidden');
}
});
// text and password input fields
var $uname = $('#username');
@ -139,3 +138,4 @@ define([
});
});
});
});

Loading…
Cancel
Save