Skip to content

Commit 962c686

Browse files
sanskar-soni-9susnux
authored andcommitted
fix(files_versions): renaming file version when its not a string
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
1 parent ed74404 commit 962c686

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/files_versions/src/utils/versions.ts

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

108108
return {
109109
fileId: fileInfo.id,
110-
label: version.props['version-label'],
110+
// 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)
111+
label: version.props['version-label'] && String(version.props['version-label']),
111112
author: version.props['version-author'] ?? null,
112113
filename: version.filename,
113114
basename: moment(mtime).format('LLL'),

0 commit comments

Comments
 (0)