Merge pull request #46001 from nextcloud/backport/45958/stable29

[stable29] fix(files_versions): renaming file version when its not a string
This commit is contained in:
Ferdinand Thiessen 2024-07-09 22:18:32 +02:00 committed by GitHub
commit 57c893e93f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long