diff --git a/src/index.ts b/src/index.ts index b13a0a7bc3..98153348ec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -80,12 +80,7 @@ async function lookup(store: Store) { */ function isOutOfStock(domText: string, oosLabels: string[]) { const domTextLowerCase = domText.toLowerCase(); - let result = false; - for (const oosLabel of oosLabels) { - result = domTextLowerCase.includes(oosLabel.toLowerCase()); - } - - return result; + return oosLabels.some(label => domTextLowerCase.includes(label)); } /**