fix(files_versions): renaming file version when its not a string

Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
pull/45958/head
Sanskar Soni 2024-06-10 15:47:21 +07:00 committed by Ferdinand Thiessen
parent 6a8d254425
commit 2aecc523c8
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with 2 additions and 1 deletions

@ -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'),