Skip to content

Commit 1d5ffe3

Browse files
skjnldsvnpmbuildbot[bot]
authored andcommitted
Fix app sidebar mountpoint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
1 parent c9d196a commit 1d5ffe3

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

apps/files/js/dist/sidebar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files/js/dist/sidebar.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files/src/sidebar.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
3838
Object.assign(window.OCA.Files.Sidebar, { Tab })
3939

4040
window.addEventListener('DOMContentLoaded', function() {
41-
// Make sure we have a proper layout
42-
if (document.getElementById('content')) {
41+
const contentElement = document.querySelector('body > .content')
42+
|| document.querySelector('body > #content')
4343

44+
// Make sure we have a proper layout
45+
if (contentElement) {
4446
// Make sure we have a mountpoint
4547
if (!document.getElementById('app-sidebar')) {
46-
const contentElement = document.getElementById('content')
4748
const sidebarElement = document.createElement('div')
4849
sidebarElement.id = 'app-sidebar'
4950
contentElement.appendChild(sidebarElement)

0 commit comments

Comments
 (0)