Skip to content

Commit

Permalink
Merge #71596
Browse files Browse the repository at this point in the history
71596: ui: fix stmt not being found r=maryliag a=maryliag

When creating a transaction fingerprint text based on
statement ids, if the statement was not found, it was
crashing and making the Transactions Page to not load.
This commit handles the case.

Release note (bug fix): Transaction page no longer crashes when
a statement is not found.

Co-authored-by: Marylia Gutierrez <[email protected]>
  • Loading branch information
craig[bot] and maryliag committed Oct 15, 2021
2 parents 484832f + 3f45fdf commit 0984f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/src/transactionsPage/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const statementFingerprintIdsToText = (
statements: Statement[],
): string => {
return statementFingerprintIds
.map(s => statements.find(stmt => stmt.id.eq(s)).key.key_data.query)
.map(s => statements.find(stmt => stmt.id.eq(s))?.key.key_data.query)
.join("\n");
};

Expand Down

0 comments on commit 0984f87

Please sign in to comment.