Skip to content

Conversation

@rashidkhalil9182
Copy link

@rashidkhalil9182 rashidkhalil9182 commented May 9, 2023

please verify this issue, if it is fixed please merged this into main and publish. Need this on urgent basis.


rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;
let onlyNumbers = rawValue.replace(this.ONLY_NUMBERS_REGEX, "");
let onlyNumbers = rawValue.replace(suffix,"").replace(this.ONLY_NUMBERS_REGEX, "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that suffix can be anything and it cannot be simply removed from any position of rawValue. It would be better to check that the string ends with suffix and remove suffix.length characters from the end of rawValue.
I think you can similarly remove prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants