fix: ignore backspace when the stack is empty

This commit is contained in:
matmoul committed 2026-05-15 20:47:19 +02:00
1 parent d1a1d44577
commit 6444357444
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -162,9 +162,10 @@ function execute(name) {
} else if (name === 'backspace') {
if (calc.isEditing) {
inputToX('Backspace');
} else {
} else if (calc.isValidIndex(0)) {
calc.remove(0);
}
} else if (name === 'swap') {
pushEditingValueIfNeeded();
if (calc.isValidIndex(1)) {