We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f686b91 commit 87ea022Copy full SHA for 87ea022
lib/bluetooth.ts
@@ -483,10 +483,8 @@ class MicrobitWebBluetoothConnectionImpl
483
if (this.status !== ConnectionStatus.CONNECTED) {
484
await this.connect({ progress, signal: options.signal });
485
}
486
- if (!this.connection) {
487
- throw new Error("Unexpected connection undefined!");
488
- }
489
- const connection = this.connection;
+
+ const connection = this.connection!;
490
try {
491
const boardVersion = connection.boardVersion;
492
if (!boardVersion) {
0 commit comments