diff --git a/android/src/main/java/com/cafebazaar/reactnativepoolakey/ReactNativePoolakeyModule.kt b/android/src/main/java/com/cafebazaar/reactnativepoolakey/ReactNativePoolakeyModule.kt index a9aa802..23c75d8 100644 --- a/android/src/main/java/com/cafebazaar/reactnativepoolakey/ReactNativePoolakeyModule.kt +++ b/android/src/main/java/com/cafebazaar/reactnativepoolakey/ReactNativePoolakeyModule.kt @@ -96,7 +96,7 @@ class ReactNativePoolakeyModule(reactContext: ReactApplicationContext) : ReactCo promise: Promise ) { - check(currentActivity != null) { + check(reactApplicationContext.currentActivity != null) { "currentActivity is null" } @@ -120,7 +120,7 @@ class ReactNativePoolakeyModule(reactContext: ReactApplicationContext) : ReactCo promise: Promise ) { - check(currentActivity != null) { + check(reactApplicationContext.currentActivity != null) { "currentActivity is null" }