1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Making sure relationships are valid before displaying them.

This commit is contained in:
mike12345567 2023-12-12 15:11:04 +00:00
parent 1b4cb0e2eb
commit f6acfc2795

View file

@ -44,14 +44,16 @@
}) })
}) })
return Object.values(relatedColumns).map(({ from, to, through }) => { return Object.values(relatedColumns)
return { .filter(({ from, to }) => from && to)
tables: `${from.tableName} ${through ? "↔" : "→"} ${to.tableName}`, .map(({ from, to, through }) => {
columns: `${from.name} to ${to.name}`, return {
from, tables: `${from.tableName} ${through ? "↔" : "→"} ${to.tableName}`,
to, columns: `${from.name} to ${to.name}`,
} from,
}) to,
}
})
} }
const handleRowClick = ({ detail }) => { const handleRowClick = ({ detail }) => {