Skip to content

Commit 12c3a8b

Browse files
author
Tyler Bannister
committed
Fix backspace on empty input issue.
1 parent 8472f6d commit 12c3a8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Input/InputIO.php

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public function collect(Input $input) : InputResult
7777
case InputCharacter::BACKSPACE:
7878
if (!empty($inputValue)) {
7979
$inputValue = substr($inputValue, 0, -1);
80+
if (!is_string($inputValue)) {
81+
$inputValue = '';
82+
}
8083
$this->parentMenu->redraw();
8184
$this->drawInput($input, $inputValue);
8285
}

0 commit comments

Comments
 (0)