Skip to content

Commit 03cad11

Browse files
committed
fix(nullpointer): apply 0.60 npe fix
1 parent 52369cc commit 03cad11

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

android/src/main/java/kjd/reactnative/bluetooth/RNBluetoothClassicModule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ public void requestBluetoothEnabled(Promise promise) {
384384
promise.resolve(true);
385385
} else {
386386
Activity activity = getCurrentActivity();
387-
if (activity != null) {
388-
mEnabledPromise = promise;
389-
387+
mEnabledPromise = promise;
388+
389+
if (activity != null) {
390390
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
391391
activity.startActivityForResult(intent, BluetoothRequest.ENABLE_BLUETOOTH.code);
392392
} else {

0 commit comments

Comments
 (0)