Fix a race condition causing the drive toolbar to be missing

pull/1/head
yflory 8 years ago
parent 2e247d44c7
commit dc39c4e179

@ -24,7 +24,6 @@ define([
}; };
var APP = window.APP = { var APP = window.APP = {
$bar: $iframe.find('#toolbar'),
editable: false, editable: false,
Cryptpad: Cryptpad, Cryptpad: Cryptpad,
loggedIn: Cryptpad.isLoggedIn() loggedIn: Cryptpad.isLoggedIn()
@ -1766,6 +1765,8 @@ define([
// don't initialize until the store is ready. // don't initialize until the store is ready.
Cryptpad.ready(function () { Cryptpad.ready(function () {
APP.$bar = $iframe.find('#toolbar');
var storeObj = Cryptpad.getStore().getProxy && Cryptpad.getStore().getProxy().proxy ? Cryptpad.getStore().getProxy() : undefined; var storeObj = Cryptpad.getStore().getProxy && Cryptpad.getStore().getProxy().proxy ? Cryptpad.getStore().getProxy() : undefined;
Cryptpad.styleAlerts(); Cryptpad.styleAlerts();

Loading…
Cancel
Save