tweak(xod-client-electron): make sending data to debug serial a bit safer

This commit is contained in:
Evgeny Kochetkov
2019-07-12 20:15:21 +03:00
parent 585a342e4f
commit bc9afc2458

View File

@@ -240,7 +240,8 @@ const onReady = () => {
)
);
ipcMain.on(EVENTS.DEBUG_SERIAL_SEND, (event, str) => {
if (!debugPort) return;
if (!debugPort || !debugPort.write) return;
debugPort.write(str);
});
ipcMain.on(EVENTS.STOP_DEBUG_SESSION, stopDebugSession);