From ea3f251c6d9d25b0f27b2847a8d5c31e915d5430 Mon Sep 17 00:00:00 2001 From: Marius Gundersen Date: Fri, 8 Dec 2023 15:32:18 +0100 Subject: [PATCH] Fixed two issues with global variables These caused problems when I tried bundling this code. --- core/serial.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/serial.js b/core/serial.js index 3ddd329..67c3f33 100644 --- a/core/serial.js +++ b/core/serial.js @@ -176,7 +176,7 @@ To add a new serial device, you must add an object to } var portInfo = { port:serialPort }; - connectionInfo = undefined; + var connectionInfo = undefined; flowControlXOFF = false; if (flowControlTimeout) { clearTimeout(flowControlTimeout); @@ -192,7 +192,6 @@ To add a new serial device, you must add an object to currentDevice = undefined; } else { connectionInfo = cInfo; - connectedPort = serialPort; console.log("Connected", cInfo); if (connectionInfo.portName) portInfo.portName = connectionInfo.portName;