aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-06-22 10:32:10 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-06-22 18:34:55 +0200
commit05bfab243a6b4820682213b9af6991579b0b0ec2 (patch)
tree798310db970dc197f746a7e2337e4371d16e64b9 /apps/files
parent723edb56544632cfe2efd51c9347e8f0198e887e (diff)
downloadnextcloud-server-05bfab243a6b4820682213b9af6991579b0b0ec2.tar.gz
nextcloud-server-05bfab243a6b4820682213b9af6991579b0b0ec2.zip
fix(files): action default is false if not set
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/actions/deleteAction.spec.ts1
-rw-r--r--apps/files/src/actions/downloadAction.spec.ts1
-rw-r--r--apps/files/src/services/FileAction.ts2
3 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/src/actions/deleteAction.spec.ts b/apps/files/src/actions/deleteAction.spec.ts
index 1046fa6dad7..c99514f9906 100644
--- a/apps/files/src/actions/deleteAction.spec.ts
+++ b/apps/files/src/actions/deleteAction.spec.ts
@@ -44,6 +44,7 @@ describe('Delete action conditions tests', () => {
expect(action.id).toBe('delete')
expect(action.displayName([], view)).toBe('Delete')
expect(action.iconSvgInline([], view)).toBe('SvgMock')
+ expect(action.default).toBe(false)
expect(action.order).toBe(100)
})
diff --git a/apps/files/src/actions/downloadAction.spec.ts b/apps/files/src/actions/downloadAction.spec.ts
index 5d75754c50c..a9b51b39510 100644
--- a/apps/files/src/actions/downloadAction.spec.ts
+++ b/apps/files/src/actions/downloadAction.spec.ts
@@ -39,6 +39,7 @@ describe('Download action conditions tests', () => {
expect(action.id).toBe('download')
expect(action.displayName([], view)).toBe('Download')
expect(action.iconSvgInline([], view)).toBe('SvgMock')
+ expect(action.default).toBe(false)
expect(action.order).toBe(30)
})
})
diff --git a/apps/files/src/services/FileAction.ts b/apps/files/src/services/FileAction.ts
index 6b2e3750a24..03cc957e1e5 100644
--- a/apps/files/src/services/FileAction.ts
+++ b/apps/files/src/services/FileAction.ts
@@ -110,7 +110,7 @@ export class FileAction {
}
get default() {
- return this._action.default
+ return this._action.default === true
}
get inline() {