Skip to content

Commit

Permalink
hotfix: Don't break if the InventoryKeys are empty (happens with non-…
Browse files Browse the repository at this point in the history
…variant products).
  • Loading branch information
sarahelsaig committed Apr 15, 2024
1 parent 679a46e commit dee24f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public static IDictionary<string, int> FilterOutdatedEntries(
this InventoryPart part) =>
part
.Inventory
.Where(inventory => part.InventoryKeys.Contains(inventory.Key))
.Where(inventory => part.InventoryKeys.Count == 0 || part.InventoryKeys.Contains(inventory.Key))
.ToDictionary(key => key.Key, value => value.Value);
}

0 comments on commit dee24f8

Please sign in to comment.