Skip to content

Commit

Permalink
fix(files): do not open file by id on load for folders
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
ShGKme authored and nextcloud-command committed Feb 2, 2024
1 parent 1f80acb commit 7b4f840
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import type { Node as NcNode } from '@nextcloud/files'
import type { PropType } from 'vue'
import type { UserConfig } from '../types'

import { getFileListHeaders, Folder, View, getFileActions } from '@nextcloud/files'
import { getFileListHeaders, Folder, View, getFileActions, FileType } from '@nextcloud/files'
import { showError } from '@nextcloud/dialogs'
import { loadState } from '@nextcloud/initial-state'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
Expand Down Expand Up @@ -248,7 +248,7 @@ export default defineComponent({
}

const node = this.nodes.find(n => n.fileid === openFileInfo.id) as NcNode
if (node === undefined) {
if (node === undefined || node.type === FileType.Folder) {
return
}

Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 7b4f840

Please sign in to comment.