]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): action default is false if not set
authorJohn Molakvoæ <skjnldsv@protonmail.com>
Thu, 22 Jun 2023 08:32:10 +0000 (10:32 +0200)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Thu, 22 Jun 2023 16:34:55 +0000 (18:34 +0200)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
apps/files/src/actions/deleteAction.spec.ts
apps/files/src/actions/downloadAction.spec.ts
apps/files/src/services/FileAction.ts

index 1046fa6dad707b558350c3d6acbee2112605dd51..c99514f9906b8e44201be1b559d34fbb763c007f 100644 (file)
@@ -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)
        })
 
index 5d75754c50cc696fc24c3924ecc78da956a44b42..a9b51b395101eaa3b90e8aca404a50de6bbc084a 100644 (file)
@@ -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)
        })
 })
index 6b2e3750a2425c807c5eaad6181fba8accc8f741..03cc957e1e52b38bb35f6fb70e0bdba4b19fac88 100644 (file)
@@ -110,7 +110,7 @@ export class FileAction {
        }
 
        get default() {
-               return this._action.default
+               return this._action.default === true
        }
 
        get inline() {