Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Fixed infinite loop bug in payment info
Browse files Browse the repository at this point in the history
  • Loading branch information
Crecket committed Oct 17, 2017
1 parent b514ae4 commit bef947a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/react/Pages/PaymentInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ class PaymentInfo extends React.Component {
}
}

componentWillUpdate() {
if (this.props.initialBunqConnect) {
componentWillUpdate(nextProps, nextState) {
if (
this.props.initialBunqConnect &&
this.props.match.params.paymentId !==
nextProps.match.params.paymentId
) {
const { paymentId } = this.props.match.params;
this.props.updatePayment(
this.props.user.id,
Expand Down Expand Up @@ -157,7 +161,6 @@ class PaymentInfo extends React.Component {
<Typography type="subheading">
{counterPartyInfo.displayName}
</Typography>

</Grid>

<Grid item xs={12}>
Expand Down

0 comments on commit bef947a

Please sign in to comment.