Skip to content

Commit

Permalink
only send event for rewards carousel if the currentProjectData is ava…
Browse files Browse the repository at this point in the history
…ilable (#2139)
  • Loading branch information
mtgriego authored Oct 1, 2024
1 parent 3ce4b30 commit 2c99cee
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ class RewardsSelectionViewModel(private val environment: Environment, private va
if (expanded && currentPage == 0) {
projectData?.let {
analytics.trackRewardsCarouselViewed(projectData = projectData)
} ?: analytics.trackRewardsCarouselViewed(projectData = currentProjectData)
} ?: {
if (::currentProjectData.isInitialized) {
analytics.trackRewardsCarouselViewed(projectData = currentProjectData)
}
}
}
}

Expand Down

0 comments on commit 2c99cee

Please sign in to comment.