Skip to content

Commit f862204

Browse files
Potential fix for code scanning alert no. 13: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Priyankar Pal <[email protected]>
1 parent e5e12de commit f862204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plays/calculator-by-tea/useCalcalulatorByTeaHook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const useCalcalulatorByTeaHook = () => {
5959
}
6060

6161
function onInputRecived(expression: string) {
62-
if (expression.match(/^(?:[0-9]+[-+*/]?)*[0-9]*$/)) {
62+
if (expression.match(/^(?:[0-9]+[-+*/])*[0-9]*$/)) {
6363
setCalculationExpression(expression);
6464
}
6565
}

0 commit comments

Comments
 (0)