Skip to content

Commit

Permalink
fix: reject if initialize is called more than once (#91)
Browse files Browse the repository at this point in the history
* fix: reject if initialize is called more than once

* fix: called the deprecated method
  • Loading branch information
tyanbiao authored Aug 19, 2023
1 parent 62b4192 commit 3c89993
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void onGroupInfoAvailable(WifiP2pGroup group) {
@ReactMethod
public void init(Promise promise) {
if (manager != null) { // prevent reinitialization
promise.reject("0x2", this.getName() + " module should only be initialized once.");
return;
}

Expand Down

0 comments on commit 3c89993

Please sign in to comment.