Merge pull request #18783 from nextcloud/fix/sidebar/do-not-wait-domcontentloaded-for-init

Init OCA.Files.Sidebar right away
This commit is contained in:
Roeland Jago Douma 2020-01-10 07:53:27 +01:00 committed by GitHub
commit e886ce7218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View file

@ -30,15 +30,14 @@ Vue.use(VueClipboard)
Vue.prototype.t = t
// 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', () => {
// 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 })
// Make sure we have a proper layout
if (document.getElementById('content')) {