We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
onConnectionStateChange
1 parent 01297d1 commit 0310f00Copy full SHA for 0310f00
src/bluetooth.android.ts
@@ -725,7 +725,10 @@ function initBluetoothGattCallback() {
725
}
726
});
727
const owner = this.owner && this.owner.get();
728
- if (owner && newState === android.bluetooth.BluetoothProfile.STATE_CONNECTED && status === GATT_SUCCESS) {
+ if (!owner) {
729
+ return;
730
+ }
731
+ if (newState === android.bluetooth.BluetoothProfile.STATE_CONNECTED && status === GATT_SUCCESS) {
732
const device = gatt.getDevice();
733
let address: string = null;
734
if (device == null) {
0 commit comments