Skip to content

Commit

Permalink
fix: crash on starting global analytics was not ready (WPB-11111) πŸ’ (#…
Browse files Browse the repository at this point in the history
…3453)

Co-authored-by: Yamil Medina <[email protected]>
  • Loading branch information
github-actions[bot] and yamilmedina authored Sep 17, 2024
1 parent 4569ea1 commit f50eb68
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ object AnonymousAnalyticsManagerImpl : AnonymousAnalyticsManager {
private val mutex = Mutex()
private lateinit var coroutineScope: CoroutineScope

init {
globalAnalyticsManager = this
}

override fun <T> init(
context: Context,
analyticsSettings: AnalyticsSettings,
Expand All @@ -57,6 +53,7 @@ object AnonymousAnalyticsManagerImpl : AnonymousAnalyticsManager {
) {
this.coroutineScope = CoroutineScope(dispatcher)
this.anonymousAnalyticsRecorder = anonymousAnalyticsRecorder
globalAnalyticsManager = this

coroutineScope.launch {
analyticsResultFlow
Expand Down

0 comments on commit f50eb68

Please sign in to comment.