diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-13 15:07:06 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-24 12:53:53 +0200 |
commit | 3782142f5996720fd68935b7073923fe658508cd (patch) | |
tree | f97e66f50e8f655855e6786c32b0056f18322689 /apps/files/src/components/FileEntryMixin.ts | |
parent | d4352fe2ffdafca2e662ddc7f9e7ec8b7eb3bb4a (diff) | |
download | nextcloud-server-3782142f5996720fd68935b7073923fe658508cd.tar.gz nextcloud-server-3782142f5996720fd68935b7073923fe658508cd.zip |
refactor(files): Fix nullish operator usage and add missing code comment
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src/components/FileEntryMixin.ts')
-rw-r--r-- | apps/files/src/components/FileEntryMixin.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 407df14fa7c..d3ae1511936 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -50,14 +50,14 @@ export default defineComponent({ computed: { currentDir() { // Remove any trailing slash but leave root slash - return (this.$route?.query?.dir?.toString() || '/').replace(/^(.+)\/$/, '$1') + return (this.$route.query?.dir?.toString() || '/').replace(/^(.+)\/$/, '$1') }, currentFileId() { return this.$route.params?.fileid || this.$route.query?.fileid || null }, fileid() { - return this.source?.fileid + return this.source.fileid ?? 0 }, uniqueId() { return hashCode(this.source.source) |