We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5518ca commit 4c3f0eaCopy full SHA for 4c3f0ea
src/ios/BLECentralPlugin.m
@@ -430,9 +430,13 @@ - (void)stopScan:(CDVInvokedUrlCommand*)command {
430
431
432
- (void)isConnected:(CDVInvokedUrlCommand*)command {
433
+ NSUUID *uuid = [self getUUID:command argumentAtIndex:0];
434
+ if (uuid == nil) {
435
+ return;
436
+ }
437
+
438
+ CBPeripheral *peripheral = [self findPeripheralByUUID:uuid];
439
CDVPluginResult *pluginResult = nil;
- CBPeripheral *peripheral = [self findPeripheralByUUID:[command argumentAtIndex:0]];
-
440
if (peripheral && peripheral.state == CBPeripheralStateConnected) {
441
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
442
} else {
0 commit comments