Skip to content

Commit 6658df8

Browse files
authored
Merge pull request #2419 from nextcloud/backport/2418/stable29
2 parents a46f5a3 + a401c81 commit 6658df8

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

js/viewer-main.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23140,6 +23140,9 @@ function getDavPath({ filename, basename: basename3, source = "" }) {
2314023140
);
2314123141
}
2314223142
const prefixUser = getUserRoot();
23143+
if (!filename || typeof filename !== "string") {
23144+
return null;
23145+
}
2314323146
if (source && !source.includes(prefixUser)) {
2314423147
return null;
2314523148
}

js/viewer-main.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/fileUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ function getDavPath({ filename, basename, source = '' }: { filename: string, bas
132132

133133
const prefixUser = getUserRoot()
134134

135+
if (!filename || typeof filename !== 'string') {
136+
return null
137+
}
138+
135139
// If we have a source but we're not a dav resource, return null
136140
if (source && !source.includes(prefixUser)) {
137141
return null

0 commit comments

Comments
 (0)