Skip to content

Commit

Permalink
fix(files_versions): renaming file version when its not a string
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jun 25, 2024
1 parent 93dcf8c commit 20aea89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/files_versions/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ function formatVersion(version: any, fileInfo: any): Version {

return {
fileId: fileInfo.id,
label: version.props['version-label'],
// If version-label is defined make sure it is a string (prevent issue if the label is a number an PHP returns a number then)
label: version.props['version-label'] && String(version.props['version-label']),
filename: version.filename,
basename: moment(mtime).format('LLL'),
mime: version.mime,
Expand Down

0 comments on commit 20aea89

Please sign in to comment.