Skip to content

Commit

Permalink
[fix]: fix logic for prefix evaluation of currency symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
RgnDunes committed May 20, 2024
1 parent 08342e6 commit 6ec2047
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const formatNumberByParts = (

return {
...formattedObj,
isPrefixSymbol: parts[0].type === 'currency',
isPrefixSymbol:
parts.findIndex((item) => item.type === 'currency') <
parts.findIndex((item) => item.type === 'integer'),
rawParts: parts,
};
} catch (err) {
Expand Down

0 comments on commit 6ec2047

Please sign in to comment.