Skip to content

Commit

Permalink
Update src/pages/iou/steps/IOUAmountPage.js
Browse files Browse the repository at this point in the history
Co-authored-by: Sahil <[email protected]>
  • Loading branch information
eh2077 and thesahindia authored Apr 5, 2023
1 parent 29cbfde commit 60991c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/iou/steps/IOUAmountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class IOUAmountPage extends React.Component {
const leadingZeroesLength = lodashGet(leadingZeroes, '[0].length', 0);
const absAmount = parseFloat((this.stripCommaFromAmount(amount) * 100).toFixed(2)).toString();

// absAmount is Infinity or value in scientific notation
// The following logic will prevent users from pasting an amount that is excessively long in length, which would result in the 'absAmount' value being expressed in scientific notation or becoming infinity."
if (/\D/.test(absAmount)) {
return CONST.IOU.AMOUNT_MAX_LENGTH + 1;
}
Expand Down

0 comments on commit 60991c8

Please sign in to comment.