fix: ignore backspace when the stack is empty
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user