Skip to content

Commit 52b2fb7

Browse files
authored
Merge pull request #3005 from nextcloud/fix/undefined
2 parents da25ad7 + b8b2058 commit 52b2fb7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • apps/viewer/apps/viewer/apps/viewer/src/views

apps/viewer/apps/viewer/apps/viewer/src/views/Viewer.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ export default defineComponent({
778778
// sort like the files list
779779
// TODO: implement global sorting API
780780
// https://github.com/nextcloud/server/blob/a83b79c5f8ab20ed9b4d751167417a65fa3c42b8/apps/files/lib/Controller/ApiController.php#L247
781-
const url = this.currentFile.source ?? this.currentFile.davPath
782781
const nodes = filteredFiles.map(
783782
file => new NcFile({
784783
source: davRemoteURL + davGetRootPath() + file.filename,
@@ -787,7 +786,7 @@ export default defineComponent({
787786
mime: file.mime,
788787
mtime: new Date(file.lastmod),
789788
owner: this.currentFile.ownerId,
790-
root: url.includes('remote.php/dav') ? davGetRootPath() : undefined,
789+
root: davGetRootPath(),
791790
}),
792791
)
793792
const sortedNodes = sortNodes(nodes, {
@@ -796,7 +795,7 @@ export default defineComponent({
796795
})
797796
798797
this.fileList = sortedNodes.map(node => {
799-
return filteredFiles.find(file => file.filename === String(dirPath + node.path))
798+
return filteredFiles.find(file => file.filename === node.path)
800799
})
801800
// store current position
802801
this.currentIndex = this.fileList.findIndex(file => file.filename === fileInfo.filename)

0 commit comments

Comments
 (0)