Skip to content

Commit

Permalink
fix: crash on starting global analytics was not ready (WPB-11111) (#3450
Browse files Browse the repository at this point in the history
)
  • Loading branch information
yamilmedina authored and github-actions[bot] committed Sep 17, 2024
1 parent 4569ea1 commit 1a7c85d
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 1a7c85d

Please sign in to comment.