Skip to content

Commit

Permalink
fix(android): set cookie jar with context
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum committed Feb 11, 2025
1 parent f32bb84 commit 68162d4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ class ApiClientModuleImpl(appContext: Context) {

private fun setCookieJar(reactContext: Context) {
val reactApplicationContext = reactContext as? ReactApplicationContext
if (reactApplicationContext?.hasActiveReactInstance() == true) {
val cookieHandler = ForwardingCookieHandler(reactApplicationContext)
cookieJar.setCookieJar(JavaNetCookieJar(cookieHandler))
}
val cookieHandler = ForwardingCookieHandler(reactApplicationContext)
cookieJar.setCookieJar(JavaNetCookieJar(cookieHandler))
}
}

Expand Down

0 comments on commit 68162d4

Please sign in to comment.