Fixed issue in collection color reading for tables that weren't configured in directus yet (#6052)

Fixes #6050
This commit is contained in:
Rijk van Zanten
2021-06-03 21:16:38 -04:00
committed by GitHub
parent fe659ec32a
commit 58e38b68ae
4 changed files with 6 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ export const useCollectionsStore = createStore({
this.state.collections = collections.map((collection: CollectionRaw) => {
const icon = collection.meta?.icon || 'label';
const color = collection.meta?.color;
const name = formatTitle(collection.collection);
if (collection.meta && notEmpty(collection.meta.translations)) {
@@ -57,6 +58,7 @@ export const useCollectionsStore = createStore({
...collection,
name,
icon,
color,
};
});