From 168f54f37b898b12d62a24c0a9aa7f6a7390195b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Tue, 9 Mar 2021 18:08:29 -0500
Subject: [PATCH] getkey() can return undefined.

---
 xtrn/lord2/l2lib.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xtrn/lord2/l2lib.js b/xtrn/lord2/l2lib.js
index 4f67e021b3..7b95092108 100644
--- a/xtrn/lord2/l2lib.js
+++ b/xtrn/lord2/l2lib.js
@@ -548,7 +548,7 @@ function getkey()
 	ch = '\x00';
 	do {
 		ch = getkeyw();
-		if (ch === null || ch.length < 1) {
+		if (ch === undefined || ch === null || ch.length < 1) {
 			ch = '\x00';
 		}
 	} while (ch === '\x00');
-- 
GitLab