diff options
| author | raldone01 <[email protected]> | 2025-07-05 19:42:44 +0200 |
|---|---|---|
| committer | raldone01 <[email protected]> | 2025-07-05 19:42:44 +0200 |
| commit | bc13c80c630f45603ddb6a1e0435bf637580fb68 (patch) | |
| tree | b89018704710eae59c53f5384182a0f6abf7b0b9 /examples/device | |
| parent | 28ded62c1c2034b29c7f3d4301386ce82e0c5ee5 (diff) | |
Attempt to fix disconnect button state desync.
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/webusb_serial/website/application.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/device/webusb_serial/website/application.js b/examples/device/webusb_serial/website/application.js index 0886f3441..5be082ca2 100644 --- a/examples/device/webusb_serial/website/application.js +++ b/examples/device/webusb_serial/website/application.js @@ -304,10 +304,15 @@ async disconnectPort() { this.stopAutoReconnect(); - if (!this.currentPort) return; + + if (!this.currentPort) { + this.updateUIConnectionState(); + return; + }; try { await this.currentPort.disconnect(); + this.setStatus('Disconnected', 'info'); } catch (error) { this.setStatus(`Disconnect error: ${error.message}`, 'error'); |
