From 4cd4fe06588712a1f665f376026b0966d6e06694 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 16 Jul 2024 11:19:47 +0200 Subject: [PATCH] Coerce dav tags to string (#11194) * Coerce dav tags to string --- changelog/unreleased/bugfix-ui-breaks-when-tags-are-numbers | 6 ++++++ packages/web-client/src/helpers/resource/functions.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/bugfix-ui-breaks-when-tags-are-numbers diff --git a/changelog/unreleased/bugfix-ui-breaks-when-tags-are-numbers b/changelog/unreleased/bugfix-ui-breaks-when-tags-are-numbers new file mode 100644 index 00000000000..5a8d8388a25 --- /dev/null +++ b/changelog/unreleased/bugfix-ui-breaks-when-tags-are-numbers @@ -0,0 +1,6 @@ +Bugfix: UI breaks when tags are numbers + +We fixed a bug where the UI breaks when tags only consists of numbers + +https://github.com/owncloud/web/pull/11194 +https://github.com/owncloud/web/issues/11193 diff --git a/packages/web-client/src/helpers/resource/functions.ts b/packages/web-client/src/helpers/resource/functions.ts index 6d3e2e9840c..3c595f009e2 100644 --- a/packages/web-client/src/helpers/resource/functions.ts +++ b/packages/web-client/src/helpers/resource/functions.ts @@ -151,7 +151,7 @@ export function buildResource(resource: WebDavResponseResource): Resource { id: resource.props[DavProperty.OwnerId], displayName: resource.props[DavProperty.OwnerDisplayName] }, - tags: (resource.props[DavProperty.Tags] || '').split(',').filter(Boolean), + tags: (resource.props[DavProperty.Tags] || '').toString().split(',').filter(Boolean), audio: convertObjectToCamelCaseKeys(resource.props[DavProperty.Audio]), location: convertObjectToCamelCaseKeys(resource.props[DavProperty.Location]), image: convertObjectToCamelCaseKeys(resource.props[DavProperty.Image]),