fix(files): do not open file by id on load for folders

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
Grigorii K. Shartsev 2024-01-27 20:18:49 +01:00
parent 63f327c7ba
commit 455d24bcfe

View file

@ -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'
@ -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
}