diff --git a/src/index.ts b/src/index.ts index 0d17924..84006ba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -143,7 +143,7 @@ const parseIngredient = (ingText: string): Ingredient[] => { // Check for a known unit of measure const firstSpace = oIng.description.indexOf(' '); const firstWord = oIng.description.substring(0, firstSpace); - if (UOM_LIST.includes(firstWord)) { + if (UOM_LIST.indexOf(firstWord) >= 0) { oIng.unitOfMeasure = firstWord; oIng.description = oIng.description.substring(firstSpace + 1); }