Skip to content

Commit

Permalink
fix: transaction may be null
Browse files Browse the repository at this point in the history
  • Loading branch information
coldnight committed Jul 11, 2022
1 parent 2428bf9 commit edd3ca2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/Transactions/components/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ class Index extends PureComponent<IndexProps, IndexState> {
}

componentDidUpdate(prevProps: IndexProps) {
if (prevProps.failureFunction == null && this.props.transaction.status !== "Executed") {
if (this.props.transaction === null) {
return;
}

if (prevProps.failureFunction === null && this.props.transaction.status !== "Executed") {
try {
const status = JSON.parse(this.props.transaction.status);
if (status.ExecutionFailure !== undefined) {
Expand Down

0 comments on commit edd3ca2

Please sign in to comment.