Skip to content

Commit

Permalink
fix setter function returning value
Browse files Browse the repository at this point in the history
- fix issue reported by DeepScan
  • Loading branch information
cassiocardoso committed May 3, 2020
1 parent b5f07b4 commit 713b405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ReactCreditCards extends React.Component {
}

if (prevProps.acceptedCards.toString() !== acceptedCards.toString()) {
this.validCardTypes = acceptedCards;
this.updateValidCardTypes(acceptedCards);
}
}

Expand Down Expand Up @@ -137,7 +137,7 @@ class ReactCreditCards extends React.Component {
return initialValidCardTypes;
}

set validCardTypes(acceptedCards) {
updateValidCardTypes(acceptedCards) {
if (acceptedCards.length) {
return this.validCardTypes.filter(card => acceptedCards.includes(card));
}
Expand Down

0 comments on commit 713b405

Please sign in to comment.