From e2adb03298addd34b6c641b59a7ed5611b9e56cd Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Sat, 31 Oct 2020 17:29:00 +0100 Subject: [PATCH] Fix #15 --- CHANGELOG.md | 1 + src/input-manager.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 626cdee..9eb531c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). ### Commits +- Add lockfile - Add tests and fix REPL mode completion - Add testing environment - Add french translation diff --git a/src/input-manager.js b/src/input-manager.js index c6ee71d..d6eaa0f 100644 --- a/src/input-manager.js +++ b/src/input-manager.js @@ -141,7 +141,7 @@ input._listener = async function (ch, key) { } // eslint-disable-next-line - if (!handled && !/^[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]$/.test(ch)) { + if (!handled && ch && !/^[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]$/.test(ch)) { this.value = value.slice(0, cursor) + ch + value.slice(cursor) cursor += 1 }