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: Sanskar Soni <sanskarsoni300@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
sanskar-soni-9 authored and nextcloud-command committed Jun 22, 2024
1 parent ed74404 commit 4a3ffec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 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 @@ -107,7 +107,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/core-common.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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 4a3ffec

Please sign in to comment.