Merge pull request #56513 from nextcloud/backport/56138/stable32

[stable32] fix(files): Do not fail on missing sidebar in files list
pull/56662/head
Andy Scherzinger 2025-11-30 19:48:10 +07:00 committed by GitHub
commit e6ee8fac54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 12 additions and 12 deletions

@ -45,15 +45,15 @@ export const action = new FileAction({
async exec(node: Node, view: View, dir: string) {
try {
// If the sidebar is already open for the current file, do nothing
if (window.OCA.Files.Sidebar.file === node.path) {
if (window.OCA.Files?.Sidebar?.file === node.path) {
logger.debug('Sidebar already open for this file', { node })
return null
}
// Open sidebar and set active tab to sharing by default
window.OCA.Files.Sidebar.setActiveTab('sharing')
window.OCA.Files?.Sidebar?.setActiveTab('sharing')
// TODO: migrate Sidebar to use a Node instead
await window.OCA.Files.Sidebar.open(node.path)
await window.OCA.Files?.Sidebar?.open(node.path)
// Silently update current fileid
window.OCP?.Files?.Router?.goToRoute(

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long