Skip to content

Commit

Permalink
Merge pull request #43292 from nextcloud/backport/43174/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(files): do not open file by id on load for folders
  • Loading branch information
ShGKme authored Feb 2, 2024
2 parents eab6b49 + 85d2baa commit 2d8c0df
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 2d8c0df

Please sign in to comment.