Conversation
* Dockerfile and PNPM updates * Updated Scripts to build dist * Workflow revert
* Unit testing updates * Unit Testing Updates * version bump * updated import name
* Bug fix fold in, Address Complete Fix, CLA Registration * version bump * Clean Up
fixed keycloak issue
* RL Transition - Amend and Renew * clean up
* RepairersLien -> CL Conversions Updates * Remove dev code * add owner bug
* Uxa updates and Conversion Discharge * remove obsolete prop
| const currency = getLengthTrust.value.lienAmount | ||
| ?.replace('$', '') |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the problem, we need to ensure that all occurrences of the dollar sign are removed from the lienAmount string. This can be achieved by using a regular expression with the global flag (g) in the replace method. This change will ensure that any dollar signs present in the string are removed, regardless of their position.
| @@ -264,3 +264,3 @@ | ||
| const currency = getLengthTrust.value.lienAmount | ||
| ?.replace('$', '') | ||
| ?.replace(/\$/g, '') | ||
| ?.replaceAll(',', '') |
| const currency = getLengthTrust.value.lienAmount | ||
| ?.replace('$', '') |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the problem, we need to ensure that all occurrences of the specified character are replaced. This can be achieved by using a regular expression with the global flag (g). Specifically, we will replace the replace method calls with regular expressions to ensure that all occurrences of the characters ('$' and ',') are replaced.
| @@ -276,4 +276,4 @@ | ||
| const currency = getLengthTrust.value.lienAmount | ||
| ?.replace('$', '') | ||
| ?.replaceAll(',', '') | ||
| ?.replace(/\$/g, '') | ||
| ?.replace(/,/g, '') | ||
| const lienFloat = parseFloat(currency) |
Issue #: /bcgov/entity#23932
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).