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 <me@shgk.me>
  • Loading branch information
ShGKme authored and backportbot[bot] committed Feb 2, 2024
1 parent 1f80acb commit c69c8fd
Showing 1 changed file with 2 additions and 2 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

0 comments on commit c69c8fd

Please sign in to comment.