Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Jul 15, 2023
1 parent 21c665e commit 3a94903
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/SettlementButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,9 @@ class SettlementButton extends React.Component {
}
buttonOptions.push(paymentMethods[CONST.IOU.PAYMENT_TYPE.ELSEWHERE]);

// Put the prefered payment method to the front of the array so its shown as default
// Put the preferred payment method to the front of the array so its shown as default
if (paymentMethod) {
const indexOfElement = _.findIndex(buttonOptions, (method) => method.value === paymentMethod);
buttonOptions.splice(indexOfElement, 1);
buttonOptions.unshift(paymentMethods[paymentMethod]);
return _.sortBy(buttonOptions, (method) => (method.value === paymentMethod ? 0 : 1));
}
return buttonOptions;
}
Expand Down

0 comments on commit 3a94903

Please sign in to comment.