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
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Priyankar Pal  <[email protected]>
  • Loading branch information
1 parent ee6d5fd commit a83f21a
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 a83f21a

Please sign in to comment.