Skip to content

Commit 3411701

Browse files
author
Arnaud Lier
authored
fix: only show download button if it's a file
1 parent 8c6c271 commit 3411701

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/scripts/components/server/files/FileDropdownMenu.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ const FileDropdownMenu = ({ file }: { file: FileObject }) => {
171171
<Row onClick={doArchive} icon={faFileArchive} title={'Archive'}/>
172172
</Can>
173173
}
174-
<Row onClick={doDownload} icon={faFileDownload} title={'Download'}/>
174+
{file.isFile &&
175+
<Row onClick={doDownload} icon={faFileDownload} title={'Download'}/>
176+
}
175177
<Can action={'file.delete'}>
176178
<Row onClick={() => setShowConfirmation(true)} icon={faTrashAlt} title={'Delete'} $danger/>
177179
</Can>

0 commit comments

Comments
 (0)