Skip to content

Commit ca413ad

Browse files
committed
fix(files_versions): renaming file version when its not a string
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent f65d956 commit ca413ad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/files_versions/src/utils/versions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ function formatVersion(version: any, fileInfo: any): Version {
108108

109109
return {
110110
fileId: fileInfo.id,
111-
label: version.props['version-label'],
111+
// 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)
112+
label: version.props['version-label'] && String(version.props['version-label']),
112113
filename: version.filename,
113114
basename: moment(mtime).format('LLL'),
114115
mime: version.mime,

0 commit comments

Comments
 (0)