Don't append index on first collection

This commit is contained in:
rijkvanzanten
2021-03-04 10:57:33 -05:00
parent 286f7191d4
commit 9dfcc7c6fb

View File

@@ -720,8 +720,8 @@ function initLocalStore(collection: string, field: string, type: typeof localTyp
state.relations[0].one_field = 'translations';
}
function getAutomaticJunctionCollectionName(left: string, right: string) {
let index = 2;
function getAutomaticJunctionCollectionName() {
let index: number = 0;
let name = getName(index);
while (collectionExists(name)) {