@@ -120,7 +120,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
120
120
const endFieldId = tables [ endTableId ] . fields . findIndex (
121
121
( f ) => f . name === endField ,
122
122
) ;
123
- if ( endField === - 1 ) return ;
123
+ if ( endFieldId === - 1 ) return ;
124
124
125
125
const startFieldId = table . fields . findIndex (
126
126
( f ) => f . name === startField ,
@@ -190,7 +190,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
190
190
const endFieldId = tables [ endTableId ] . fields . findIndex (
191
191
( f ) => f . name === endField ,
192
192
) ;
193
- if ( endField === - 1 ) return ;
193
+ if ( endFieldId === - 1 ) return ;
194
194
195
195
const startFieldId = table . fields . findIndex (
196
196
( f ) => f . name === startField ,
@@ -314,7 +314,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
314
314
const endFieldId = tables [ endTableId ] . fields . findIndex (
315
315
( f ) => f . name === endField ,
316
316
) ;
317
- if ( endField === - 1 ) return ;
317
+ if ( endFieldId === - 1 ) return ;
318
318
319
319
const startFieldId = tables [ startTableId ] . fields . findIndex (
320
320
( f ) => f . name === startField ,
0 commit comments