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:
commit
e886ce7218
3 changed files with 7 additions and 8 deletions
BIN
apps/files/js/dist/sidebar.js
vendored
BIN
apps/files/js/dist/sidebar.js
vendored
Binary file not shown.
BIN
apps/files/js/dist/sidebar.js.map
vendored
BIN
apps/files/js/dist/sidebar.js.map
vendored
Binary file not shown.
|
@ -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')) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue