From 39e24189f35de05b580bb3f3cb9d48e306c35b0a Mon Sep 17 00:00:00 2001 From: hasura-bot Date: Tue, 12 Mar 2024 14:46:15 +0530 Subject: [PATCH] prevent console crash when using native queries in an array relationship GITHUB_PR_NUMBER: 10163 GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/10163 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10717 Co-authored-by: Alec Flett <135340+alecf@users.noreply.github.com> GitOrigin-RevId: a21c22dfddd5cbbd03bd43676b47e5dd0f9f38e6 --- .../Services/Data/TableRelationships/autoRelations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TableRelationships/autoRelations.js b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TableRelationships/autoRelations.js index fce62f82247..3166e7ab416 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TableRelationships/autoRelations.js +++ b/frontend/libs/console/legacy-ce/src/lib/components/Services/Data/TableRelationships/autoRelations.js @@ -69,7 +69,7 @@ const isExistingArrRel = (currentArrRels, relCols, relTable) => { currRCol = Object.values(arrRelDef.manual_configuration.column_mapping); } - if (currTable.name === relTable && sameRelCols(currRCol, relCols)) { + if (currTable?.name === relTable && sameRelCols(currRCol, relCols)) { _isExistingArrRel = true; break; }