Skip to content

Commit

Permalink
Fix code scanning alert no. 2: Incomplete string escaping or encoding (
Browse files Browse the repository at this point in the history
…#1543)

Signed-off-by: Priyankar Pal  <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ee6d5fd commit 22d3eed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const useCalcalulatorByTeaHook = () => {
return prevHistory;
});

return String(eval(prevExpression.replace('%', '*100/')));
return String(eval(prevExpression.replace(/%/g, '*100/')));
});
} else if (action === 'C') {
setCalculationExpression((prev) => {
Expand Down

0 comments on commit 22d3eed

Please sign in to comment.