Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
take 'malt' out of the token/parser blacklists to account for things …
Browse files Browse the repository at this point in the history
…like 'wheat malt'
  • Loading branch information
andy-haynes committed Dec 16, 2017
1 parent 5b9c6a0 commit 87be68b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export async function tokenizeIngredients() {

const ingredients = data.tokenizeIngredients;
return {
[IngredientType.Grain]: ingredients.grains.reduce(histogramReduce(['malt', 'ale'], ['name']), {}),
[IngredientType.Grain]: ingredients.grains.reduce(histogramReduce(['ale'], ['name']), {}),
[IngredientType.Hop]: ingredients.hops.reduce(histogramReduce(['hop'], ['name']), {}),
[IngredientType.Yeast]: ingredients.yeast.reduce(histogramReduce(['yeast'], ['name', 'code']), {})
};
Expand Down Expand Up @@ -422,7 +422,7 @@ export async function matchParsedIngredients(parsed, searchCache, configuration)
const getName = (i) => (i.name || i.code).toLowerCase();

const [parsedGrains, parsedHops, parsedYeast] = [
matchingIdStr(parsed.grains.map(getName), searchCache[IngredientType.Grain], ['malt']),
matchingIdStr(parsed.grains.map(getName), searchCache[IngredientType.Grain], []),
matchingIdStr(parsed.hops.map(getName), searchCache[IngredientType.Hop], ['hop']),
matchingIdStr(parsed.yeast.map(getName), searchCache[IngredientType.Yeast], ['yeast'])
];
Expand Down

0 comments on commit 87be68b

Please sign in to comment.