Fix corrupted endFieldIds after import
This commit is contained in:
parent
935900d32b
commit
9fd682ccdc
@ -119,7 +119,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = table.fields.findIndex(
|
const startFieldId = table.fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
@ -223,7 +223,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = tables[startTableId].fields.findIndex(
|
const startFieldId = tables[startTableId].fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
|
@ -131,7 +131,7 @@ export function fromMSSQL(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = table.fields.findIndex(
|
const startFieldId = table.fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
@ -235,7 +235,7 @@ export function fromMSSQL(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = tables[startTableId].fields.findIndex(
|
const startFieldId = tables[startTableId].fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
|
@ -119,7 +119,7 @@ export function fromMySQL(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = table.fields.findIndex(
|
const startFieldId = table.fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
@ -223,7 +223,7 @@ export function fromMySQL(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = tables[startTableId].fields.findIndex(
|
const startFieldId = tables[startTableId].fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
|
@ -136,7 +136,7 @@ export function fromSQLite(ast, diagramDb = DB.GENERIC) {
|
|||||||
const endFieldId = tables[endTableId].fields.findIndex(
|
const endFieldId = tables[endTableId].fields.findIndex(
|
||||||
(f) => f.name === endField,
|
(f) => f.name === endField,
|
||||||
);
|
);
|
||||||
if (endField === -1) return;
|
if (endFieldId === -1) return;
|
||||||
|
|
||||||
const startFieldId = table.fields.findIndex(
|
const startFieldId = table.fields.findIndex(
|
||||||
(f) => f.name === startField,
|
(f) => f.name === startField,
|
||||||
|
Loading…
Reference in New Issue
Block a user