File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -379,19 +379,19 @@ export class BluetoothDeviceWrapper {
379
379
async startNotifications ( type : TypedServiceEvent ) {
380
380
const serviceInfo = this . serviceInfo . find ( ( s ) => s . events . includes ( type ) ) ;
381
381
if ( serviceInfo ) {
382
- // TODO: type cheat! why?
383
- const service = await this . createIfNeeded ( serviceInfo as any , true ) ;
384
- this . queueGattOperation (
385
- async ( ) => await service ?. startNotifications ( type ) ,
386
- ) ;
382
+ this . queueGattOperation ( async ( ) => {
383
+ // TODO: type cheat! why?
384
+ const service = await this . createIfNeeded ( serviceInfo as any , true ) ;
385
+ await service ?. startNotifications ( type ) ;
386
+ } ) ;
387
387
}
388
388
}
389
389
390
390
async stopNotifications ( type : TypedServiceEvent ) {
391
- const serviceInfo = this . serviceInfo . find ( ( s ) => s . events . includes ( type ) ) ;
392
- this . queueGattOperation (
393
- async ( ) => await serviceInfo ?. get ( ) ?. stopNotifications ( type ) ,
394
- ) ;
391
+ this . queueGattOperation ( async ( ) => {
392
+ const serviceInfo = this . serviceInfo . find ( ( s ) => s . events . includes ( type ) ) ;
393
+ await serviceInfo ?. get ( ) ?. stopNotifications ( type ) ;
394
+ } ) ;
395
395
}
396
396
397
397
private disposeServices ( ) {
You can’t perform that action at this time.
0 commit comments