diff --git a/.changeset/serious-pants-melt.md b/.changeset/serious-pants-melt.md new file mode 100644 index 0000000000..ea530f4670 --- /dev/null +++ b/.changeset/serious-pants-melt.md @@ -0,0 +1,5 @@ +--- +"@directus/app": patch +--- + +Fixed display of thumbnail using tabular layout in File Library diff --git a/app/src/composables/use-alias-fields.ts b/app/src/composables/use-alias-fields.ts index f9b72138bf..6a00c71d0f 100644 --- a/app/src/composables/use-alias-fields.ts +++ b/app/src/composables/use-alias-fields.ts @@ -111,11 +111,13 @@ export function useAliasFields( function getFromAliasedItem>(item: T, key: string): K | undefined { const aliasInfo = Object.values(aliasedFields.value).find((field) => field.key === key); - // Skip any fields prefixed with $ as they dont exist. ($thumbnail as an example) - key = key - .split('.') - .filter((k) => !k.startsWith('$')) - .join('.'); + // Skip any nested fields prefixed with $ as they dont exist. ($thumbnail as an example) + key = key.includes('.') + ? key + .split('.') + .filter((k) => !k.startsWith('$')) + .join('.') + : key; if (!aliasInfo || !aliasInfo.aliased) return get(item, key);