Skip to content

Commit

Permalink
fix:data plan blocking app crashes (#368)
Browse files Browse the repository at this point in the history
Co-authored-by: markvdouw <[email protected]>
  • Loading branch information
2 people authored and Sam Dozor committed May 3, 2023
1 parent 433c910 commit 14cc2b5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Data Plan parsed for Kit Filtering:
if (event is CommerceEvent) {
val productActionDatapoint = dataPoints["$dataPointKey.$PRODUCT_ACTION_PRODUCTS"]
event.products?.iterator()?.forEach { product ->
product?.customAttributes?.apply {
product?.customAttributes?.toMutableMap()?.apply {
val filteredAttributes = filterKeys {
productActionDatapoint?.contains(it) ?: true
}
Expand All @@ -113,7 +113,7 @@ Data Plan parsed for Kit Filtering:
if ((event.impressions?.size ?: 0) > 0) {
event.impressions?.iterator()?.forEach {
it.products.forEach { product ->
product?.customAttributes?.apply {
product?.customAttributes?.toMutableMap()?.apply {
val filteredAttributes = filterKeys {
productImpressionDatapoint?.contains(it) ?: true
}
Expand Down

0 comments on commit 14cc2b5

Please sign in to comment.