()
| 86 | return; |
| 87 | } |
| 88 | // As backup, use the typed answer and preserve previous history (newest-first, like Node readline). |
| 89 | if (answer !== null && answer.length > 0 && history[0] !== answer) { |
| 90 | history.unshift(answer); |
| 91 | trimHistory(); |
| 92 | } |
| 93 | } |
| 94 |