Skip to content

Commit ce85bb6

Browse files
committed
Fix relationship swap table crashing
1 parent d389c28 commit ce85bb6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/EditorSidePanel/RelationshipsTab/RelationshipInfo.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,12 @@ export default function RelationshipInfo({ data }) {
139139
dataSource={[
140140
{
141141
key: "1",
142-
foreign: `${tables[data.startTableId].name}(${
143-
tables[data.startTableId].fields[data.startFieldId].name
142+
foreign: `${tables[data.startTableId]?.name}(${
143+
tables[data.startTableId].fields[data.startFieldId]
144+
?.name
144145
})`,
145-
primary: `${tables[data.endTableId].name}(${
146-
tables[data.endTableId].fields[data.endFieldId].name
146+
primary: `${tables[data.endTableId]?.name}(${
147+
tables[data.endTableId].fields[data.endFieldId]?.name
147148
})`,
148149
},
149150
]}

0 commit comments

Comments
 (0)