Merge pull request #23458 from nextcloud/backport/23448/stable20

[stable20] Fix app sidebar mountpoint
This commit is contained in:
John Molakvoæ 2020-10-15 16:43:30 +02:00 committed by GitHub
commit 904396c5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -38,12 +38,13 @@ Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
Object.assign(window.OCA.Files.Sidebar, { Tab })
window.addEventListener('DOMContentLoaded', function() {
// Make sure we have a proper layout
if (document.getElementById('content')) {
const contentElement = document.querySelector('body > .content')
|| document.querySelector('body > #content')
// Make sure we have a proper layout
if (contentElement) {
// Make sure we have a mountpoint
if (!document.getElementById('app-sidebar')) {
const contentElement = document.getElementById('content')
const sidebarElement = document.createElement('div')
sidebarElement.id = 'app-sidebar'
contentElement.appendChild(sidebarElement)