Skip to content

Commit

Permalink
fix: Fix CombinedKitchenItemProvider not using correct ingredient tok…
Browse files Browse the repository at this point in the history
…ens when cache is used #731
  • Loading branch information
BlayTheNinth committed Oct 29, 2024
1 parent 99b7174 commit 575cf34
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ private record CacheHintWrapper(int providerIndex, CacheHint cacheHint) implemen
public IngredientToken findIngredient(Ingredient ingredient, Collection<IngredientToken> ingredientTokens, CacheHint cacheHint) {
if (cacheHint instanceof CacheHintWrapper wrapper) {
final var provider = providers.get(wrapper.providerIndex);
final var token = provider.findIngredient(ingredient, ingredientTokens, wrapper.cacheHint);
final var filteredIngredientTokens = getFilteredIngredientTokens(ingredientTokens, wrapper.providerIndex);
final var token = provider.findIngredient(ingredient, filteredIngredientTokens, wrapper.cacheHint);
if (token != null) {
return new IngredientTokenWrapper(wrapper.providerIndex, token);
}
Expand Down

0 comments on commit 575cf34

Please sign in to comment.