Skip to content

Commit

Permalink
add null check on formatProducts
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxi-zeng committed Sep 28, 2021
1 parent 7d03a6a commit 2db7f85
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ && isNullOrEmpty(properties.currency())) {

private static ArrayList<Bundle> formatProducts(List<ValueMap> products) {
ArrayList<Bundle> mappedProducts = new ArrayList<>();
if (products == null) return mappedProducts;

for (ValueMap product : products) {
Bundle mappedProduct = new Bundle();
for (Map.Entry<String, Object> innerEntry : product.entrySet()) {
Expand Down

0 comments on commit 2db7f85

Please sign in to comment.