mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Fix translations hint not linking to collection (#6172)
This commit is contained in:
@@ -370,8 +370,10 @@ export default defineComponent({
|
||||
const translationsCollection = computed(() => {
|
||||
if (localType.value !== 'translations') return null;
|
||||
|
||||
const relation = relationsStore.relations.find((relation: Relation) => {
|
||||
relation.related_collection === props.field.collection && relation.meta?.one_field === props.field.field;
|
||||
const relation = relationsStore.relations.find((relation) => {
|
||||
return (
|
||||
relation.related_collection === props.field.collection && relation.meta?.one_field === props.field.field
|
||||
);
|
||||
});
|
||||
|
||||
if (!relation) return null;
|
||||
@@ -379,9 +381,9 @@ export default defineComponent({
|
||||
return relation.collection;
|
||||
});
|
||||
|
||||
const translationsFieldsCount = computed(() => {
|
||||
const translationsFieldsCount = computed<number>(() => {
|
||||
if (!translationsCollection.value) return 0;
|
||||
const fields = fieldsStore.getFieldsForCollection(translationsCollection.value);
|
||||
|
||||
return fields.filter((field: Field) => field.meta?.hidden !== true).length;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user