summaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-01-10 07:53:27 +0100
committerGitHub <noreply@github.com>2020-01-10 07:53:27 +0100
commite886ce72185e78ac5ca031d28eb249f98df14841 (patch)
tree54d1fd92634b5d8d985f0eb6bf66e1f58fa6ce15 /apps/files/src
parentcfa08ab262c80c63652a2f79e29ef5b07a046571 (diff)
parent2261629fe56091334a1be2ba9a12214e2ab0276e (diff)
downloadnextcloud-server-e886ce72185e78ac5ca031d28eb249f98df14841.tar.gz
nextcloud-server-e886ce72185e78ac5ca031d28eb249f98df14841.zip
Merge pull request #18783 from nextcloud/fix/sidebar/do-not-wait-domcontentloaded-for-init
Init OCA.Files.Sidebar right away
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/sidebar.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/files/src/sidebar.js b/apps/files/src/sidebar.js
index 717e659e661..16e2035190f 100644
--- a/apps/files/src/sidebar.js
+++ b/apps/files/src/sidebar.js
@@ -30,15 +30,14 @@ Vue.use(VueClipboard)
Vue.prototype.t = t
-window.addEventListener('DOMContentLoaded', () => {
-
- // Init Sidebar Service
- if (!window.OCA.Files) {
- window.OCA.Files = {}
- }
- Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
- Object.assign(window.OCA.Files.Sidebar, { Tab })
+// Init Sidebar Service
+if (!window.OCA.Files) {
+ window.OCA.Files = {}
+}
+Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
+Object.assign(window.OCA.Files.Sidebar, { Tab })
+window.addEventListener('DOMContentLoaded', () => {
// Make sure we have a proper layout
if (document.getElementById('content')) {