nextcloud/apps/files/src
Szymon Kłos dc3741a203 fix(files): Do not fail on missing sidebar in files list
When using richdocuments it was failing in case of shared links
or when user with opened file did a wheel click on a refresh page.
Then new tab appeared but instead opening the file it was doing
nothing (showing the list of files) or downloading the file.

Make code more defensive. I found these logs while debugging:
OCA.Files.Settings initialized
Sidebar.js:19 OCA.Files.Sidebar initialized
ShareSearch.js:16 OCA.Sharing.ShareSearch initialized
comments-app.js:15 OCA.Comments.View initialized
index.mjs:54 files: Error while opening sidebar Object
log @ index.mjs:54
index.mjs:54 files: Error while opening sidebar Objectapp: "files"
TypeError: window.OCA.Files.Sidebar.open is not a function
    at h.exec (http://nc/dist/files-main.js?v=106d16db-0:1:70123)
    at o.openSidebarForFile (http://nc/dist/files-main.js?v=106d16db-0:1:163422)
    at o.handleOpenQueries (http://nc/dist/files-main.js?v=106d16db-0:1:163167)
    at o.openDetails (http://nc/dist/files-main.js?v=106d16db-0:1:162349)
    at fn (http://nc/dist/core-common.js?v=106d16db-0:1:3942538)
    at e.run (http://nc/dist/core-common.js?v=106d16db-0:1:3946900)
    at sa (http://nc/dist/core-common.js?v=106d16db-0:1:3948728)
    at Array.<anonymous> (http://nc/dist/core-common.js?v=106d16db-0:1:3943585)
    at bn (http://nc/dist/core-common.js?v=106d16db-0:1:3942986)level: 2uid: "admin"
       [[Prototype]]: Object
log @ index.mjs:54

Possibly regression from
e7001022c7

Fixes https://github.com/nextcloud/richdocuments/issues/3815

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2025-11-18 13:27:54 +00:00
..
actions fix(files): Do not fail on missing sidebar in files list 2025-11-18 13:27:54 +00:00
components refactor(files): migrate to new NcForm* components for app settings 2025-11-14 13:09:06 +01:00
composables refactor(test): migrate cypress component tests to vitest 2025-10-14 14:30:14 +02:00
filters chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
mixins chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
models fix(files): use correct types for the Settings 2025-11-14 13:09:05 +01:00
newMenu chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
plugins/search chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
router chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
services fix(files): make sure drag-and-drop and the upload menu behaves the same 2025-10-28 16:08:43 +01:00
store fix(files): use correct types for the Settings 2025-11-14 13:09:05 +01:00
utils refactor: adjust code for breaking changes in @nextcloud/dialogs v7 2025-10-15 13:45:12 +02:00
views refactor(files): migrate to new NcForm* components for app settings 2025-11-14 13:09:06 +01:00
eventbus.d.ts fix(files): use correct types for the Settings 2025-11-14 13:09:05 +01:00
FilesApp.vue chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
init.ts chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
logger.ts refactor(files): Migrate logger util to Typescript 2024-08-01 03:20:56 +02:00
main-settings-admin.ts chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
main-settings-personal.ts chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
main.ts fix(files): use correct types for the Settings 2025-11-14 13:09:05 +01:00
reference-files.ts chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
sidebar.ts chore: adjust code to new codestyle 2025-10-02 13:19:42 +02:00
types.ts fix(files): use correct types for the Settings 2025-11-14 13:09:05 +01:00