From 5d576dca9de518bc3ee8fd3f572ea261cea1c051 Mon Sep 17 00:00:00 2001 From: Keiichiro Amemiya Date: Sat, 23 Nov 2024 00:32:57 +0100 Subject: [PATCH] chore: compatibility for nodecg 2 --- src/channels/pinball/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/channels/pinball/index.tsx b/src/channels/pinball/index.tsx index 42e6507..1da6b5f 100644 --- a/src/channels/pinball/index.tsx +++ b/src/channels/pinball/index.tsx @@ -187,6 +187,9 @@ function GetHeightFromPos(position: vector3) { } keysRep.on('change', (newKeys) => { + if (typeof newKeys === 'undefined') { + return; + } PinballModule.then((game) => { game.toggleLeftFlipper(newKeys.LDown); game.toggleRightFlipper(newKeys.RDown);