Skip to content

Commit 3c4e0f1

Browse files
fix(android): use reactApplicationContext.currentActivity in stepUp and openAdminPortal
1 parent 4500e94 commit 3c4e0f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

android/src/main/java/com/frontegg/reactnative/FronteggRNModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class FronteggRNModule(val reactContext: ReactApplicationContext) :
169169

170170
@ReactMethod
171171
fun stepUp(maxAgeSeconds: Double, promise: Promise) {
172-
val activity = currentActivity
172+
val activity = reactApplicationContext.currentActivity
173173
if (activity == null) {
174174
promise.reject("NO_ACTIVITY", "Current activity is null")
175175
return
@@ -219,7 +219,7 @@ class FronteggRNModule(val reactContext: ReactApplicationContext) :
219219

220220
@ReactMethod
221221
fun openAdminPortal(promise: Promise) {
222-
val activity = currentActivity
222+
val activity = reactApplicationContext.currentActivity
223223
if (activity == null) {
224224
promise.reject("NO_ACTIVITY", "Cannot open Admin Portal without an active Activity")
225225
return

0 commit comments

Comments
 (0)