Don't try to end a transmission with no start time

Fixes #38
This commit is contained in:
Neale Pickett 2022-04-22 19:42:30 -06:00
parent 50f4b41dd9
commit 2f9e651958
1 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,9 @@ class VailClient {
* Stop the side tone buzzer, and send out how long it was active. * Stop the side tone buzzer, and send out how long it was active.
*/ */
endTx() { endTx() {
if (!this.beginTxTime) {
return
}
let endTxTime = Date.now() let endTxTime = Date.now()
let duration = endTxTime - this.beginTxTime let duration = endTxTime - this.beginTxTime
this.buzzer.Silence(true) this.buzzer.Silence(true)