From 040fd76d80241a506b502d526be98101881909ba Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sat, 20 Apr 2024 23:24:40 +0200 Subject: [PATCH] Fix intermittent race condition (#3901) Fix race condition --- src/js/serial_backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/serial_backend.js b/src/js/serial_backend.js index b8d17283da..10067c8296 100644 --- a/src/js/serial_backend.js +++ b/src/js/serial_backend.js @@ -150,7 +150,7 @@ export function initializeSerialBackend() { finishClose(toggleStatus); } - mspHelper.setArmingEnabled(true, false, onFinishCallback); + mspHelper?.setArmingEnabled(true, false, onFinishCallback); } } }