Skip to content

Commit 59b98d2

Browse files
authored
fix compiling on react native 0.81+ (#16)
That should be reactApplicationContext
1 parent 5691466 commit 59b98d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

android/src/main/java/com/paypalwebpayments/PaypalWebPaymentsModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ class PaypalWebPaymentsModule internal constructor(context: ReactApplicationCont
3636
onEvent: Callback?
3737
) {
3838

39-
currentActivity!!.runOnUiThread {
39+
reactApplicationContext.currentActivity!!.runOnUiThread {
4040
val config = CoreConfig(
4141
clientID,
4242
environment.toEnvironment()
4343
)
4444

4545
val payPalWebCheckoutClient = PayPalWebCheckoutClient(
46-
currentActivity as FragmentActivity,
46+
reactApplicationContext.currentActivity as FragmentActivity,
4747
config,
4848
urlScheme
4949
)

0 commit comments

Comments
 (0)