Skip to content

Commit

Permalink
Merge pull request #45958 from nextcloud/fix/renaming-file-version-wh…
Browse files Browse the repository at this point in the history
…en-number

fix(files_versions): renaming file version when its not a string
  • Loading branch information
artonge authored Jun 20, 2024
2 parents a05a04c + efe4e04 commit 392ee62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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 @@ -91,7 +91,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']),
author: version.props['version-author'] ?? null,
filename: version.filename,
basename: moment(mtime).format('LLL'),
Expand Down
4 changes: 2 additions & 2 deletions dist/files_versions-files_versions.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_versions-files_versions.js.map

Large diffs are not rendered by default.

0 comments on commit 392ee62

Please sign in to comment.