Fix M2O interface in junction tables (#14078)

This commit is contained in:
Azri Kahar
2022-06-24 21:37:23 +08:00
committed by GitHub
parent ea3bf3a597
commit 7a21f701eb

View File

@@ -26,7 +26,7 @@ export function useRelationM2O(collection: Ref<string>, field: Ref<string>) {
const relationInfo = computed<RelationM2O | undefined>(() => {
const relations = relationsStore.getRelationsForField(collection.value, field.value);
if (relations.length !== 1) return undefined;
if (relations.length === 0) return undefined;
const relation = relations[0];