Fix importing foreign keys from sqlite (#478)

This commit is contained in:
1ilit
2025-06-05 18:20:19 +04:00
committed by GitHub
parent 9570df983d
commit ae388291db

View File

@@ -53,7 +53,7 @@ export function fromSQLite(ast, diagramDb = DB.GENERIC) {
const endTable = tables.find((t) => t.name === endTableName);
if (!endTable) return;
const endField = endTable.fields.findIndex((f) => f.name === endFieldName);
const endField = endTable.fields.find((f) => f.name === endFieldName);
if (!endField) return;
const startField = startTable.fields.find((f) => f.name === startFieldName);