From 2f9e65195810e19cd69142693c8358862aaea9cd Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Fri, 22 Apr 2022 19:42:30 -0600 Subject: [PATCH] Don't try to end a transmission with no start time Fixes #38 --- static/vail.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/vail.mjs b/static/vail.mjs index 4f03546..5e9cda7 100644 --- a/static/vail.mjs +++ b/static/vail.mjs @@ -262,6 +262,9 @@ class VailClient { * Stop the side tone buzzer, and send out how long it was active. */ endTx() { + if (!this.beginTxTime) { + return + } let endTxTime = Date.now() let duration = endTxTime - this.beginTxTime this.buzzer.Silence(true)