chore: Fix backspace functionality in Calculator component

This commit is contained in:
divyeshbirawat 2024-07-13 21:36:40 +05:30
parent 1194ea677e
commit 618c2fe487

View file

@ -137,6 +137,11 @@ export function Calculator({ active }: WindowProps) {
case "%":
addInput("%");
break;
case "Backspace":
if (input != null && input.length > 0) {
setInput(input.slice(0, -1));
}
break;
}
};