Skip to content

Commit f52cc00

Browse files
KenChoiKenChoi
authored andcommitted
fix bug
1 parent 11cb89b commit f52cc00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

android/src/main/java/cn/jpush/reactnativejpush/JPushModule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ public void setStyleCustom() {
381381
@ReactMethod
382382
public void getRegistrationID(Callback callback) {
383383
try {
384-
mContext = getCurrentActivity();
385-
String id = JPushInterface.getRegistrationID(mContext);
384+
String id = JPushInterface.getRegistrationID(getReactApplicationContext());
386385
if (id != null) {
387386
callback.invoke(id);
388387
} else {

0 commit comments

Comments
 (0)