diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-25 10:09:22 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-26 23:49:52 +0200 |
commit | ca413ad11f3f3e85afe0b14a8dd9304a7984f775 (patch) | |
tree | 11a15001a6e143a71c3bd426c8653da1923a9867 /apps/files_versions/src/utils | |
parent | f65d956a7219b30dd16a11682b2d31c430dd8040 (diff) | |
download | nextcloud-server-ca413ad11f3f3e85afe0b14a8dd9304a7984f775.tar.gz nextcloud-server-ca413ad11f3f3e85afe0b14a8dd9304a7984f775.zip |
fix(files_versions): renaming file version when its not a string
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_versions/src/utils')
-rw-r--r-- | apps/files_versions/src/utils/versions.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_versions/src/utils/versions.ts b/apps/files_versions/src/utils/versions.ts index b33f75aefa7..051959ba36b 100644 --- a/apps/files_versions/src/utils/versions.ts +++ b/apps/files_versions/src/utils/versions.ts @@ -108,7 +108,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']), filename: version.filename, basename: moment(mtime).format('LLL'), mime: version.mime, |