Skip to content

Commit a8e4edb

Browse files
committed
fix(files): do not open file by id on load for folders
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
1 parent 65b8c8f commit a8e4edb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/files/src/components/FilesListVirtual.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import type { Node as NcNode } from '@nextcloud/files'
7373
import type { PropType } from 'vue'
7474
import type { UserConfig } from '../types'
7575
76-
import { getFileListHeaders, Folder, View, getFileActions } from '@nextcloud/files'
76+
import { getFileListHeaders, Folder, View, getFileActions, FileType } from '@nextcloud/files'
7777
import { showError } from '@nextcloud/dialogs'
7878
import { loadState } from '@nextcloud/initial-state'
7979
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
@@ -248,7 +248,7 @@ export default defineComponent({
248248
}
249249
250250
const node = this.nodes.find(n => n.fileid === openFileInfo.id) as NcNode
251-
if (node === undefined) {
251+
if (node === undefined || node.type === FileType.Folder) {
252252
return
253253
}
254254

0 commit comments

Comments
 (0)