From dc39c4e179855fefcf0693cd727365d4bfb47702 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 31 Jan 2017 11:50:20 +0100 Subject: [PATCH] Fix a race condition causing the drive toolbar to be missing --- www/drive/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/drive/main.js b/www/drive/main.js index 6290e67f0..52a1179bf 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -24,7 +24,6 @@ define([ }; var APP = window.APP = { - $bar: $iframe.find('#toolbar'), editable: false, Cryptpad: Cryptpad, loggedIn: Cryptpad.isLoggedIn() @@ -1766,6 +1765,8 @@ define([ // don't initialize until the store is ready. Cryptpad.ready(function () { + APP.$bar = $iframe.find('#toolbar'); + var storeObj = Cryptpad.getStore().getProxy && Cryptpad.getStore().getProxy().proxy ? Cryptpad.getStore().getProxy() : undefined; Cryptpad.styleAlerts();