From 1f82a2bde51cd11156c25365a247e17e229a181a Mon Sep 17 00:00:00 2001 From: NoobishSVK Date: Mon, 15 Jul 2024 22:40:39 +0200 Subject: [PATCH] hotfix try for OK line #2 --- server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 2676a58..0fc1ab7 100644 --- a/server/index.js +++ b/server/index.js @@ -74,7 +74,7 @@ function connectToSerial() { serialport.write('x\n'); serialport.on('data', (data) => { - if (data.startsWith('OK')) { + if (data && data.startsWith('OK')) { okReceived = true; // Send the remaining commands