From 56338544b507f7897b74a7a027f0edb6bed9c1c7 Mon Sep 17 00:00:00 2001 From: greysoh Date: Tue, 7 May 2024 11:44:33 -0400 Subject: [PATCH] fix: Fixes random crashing when resizing the window. --- lom/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lom/src/index.ts b/lom/src/index.ts index cac04de..b3a72ea 100644 --- a/lom/src/index.ts +++ b/lom/src/index.ts @@ -69,7 +69,10 @@ server.on("connection", client => { // We're dumb. We don't really care. conn.on("pty", accept => accept()); - conn.on("window-change", accept => accept()); + conn.on("window-change", accept => { + if (typeof accept != "function") return; + accept(); + }); conn.on("shell", async accept => { const stream = accept();