mirror of
https://github.com/directus/directus.git
synced 2026-02-01 12:45:02 -05:00
Fix type issue
This commit is contained in:
@@ -629,10 +629,7 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
state.relations[0].one_field = state.fieldData.field;
|
||||
|
||||
if (collectionExists(state.fieldData.field) && type !== 'translations') {
|
||||
state.relations[0].many_collection = getAutomaticJunctionCollectionName(
|
||||
state.relations[0].one_collection,
|
||||
state.relations[1].one_collection
|
||||
);
|
||||
state.relations[0].many_collection = getAutomaticJunctionCollectionName();
|
||||
state.relations[0].many_field = `${state.relations[0].one_collection}_${state.relations[0].one_primary}`;
|
||||
state.relations[1].one_collection = state.fieldData.field;
|
||||
|
||||
@@ -665,14 +662,8 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
|
||||
[() => state.relations[1].one_collection, () => state.relations[1].one_primary],
|
||||
([newRelatedCollection, newRelatedPrimary]: string[]) => {
|
||||
if (newRelatedCollection) {
|
||||
state.relations[0].many_collection = getAutomaticJunctionCollectionName(
|
||||
state.relations[0].one_collection,
|
||||
state.relations[1].one_collection
|
||||
);
|
||||
state.relations[1].many_collection = getAutomaticJunctionCollectionName(
|
||||
state.relations[0].one_collection,
|
||||
state.relations[1].one_collection
|
||||
);
|
||||
state.relations[0].many_collection = getAutomaticJunctionCollectionName();
|
||||
state.relations[1].many_collection = getAutomaticJunctionCollectionName();
|
||||
state.relations[0].many_field = `${state.relations[0].one_collection}_${state.relations[0].one_primary}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user