diff --git a/src/store/lookup.ts b/src/store/lookup.ts index 5b5a524..b126a0f 100644 --- a/src/store/lookup.ts +++ b/src/store/lookup.ts @@ -449,19 +449,6 @@ async function lookupCardInStock(store: Store, page: Page, link: Link) { } } - if (store.labels.inStock) { - const options = { - ...baseOptions, - requireVisible: true, - type: 'outerHTML' as const, - }; - - if (!(await pageIncludesLabels(page, store.labels.inStock, options))) { - logger.info(Print.outOfStock(link, store, true)); - return false; - } - } - if (link.labels?.inStock) { const options = { ...baseOptions, @@ -475,6 +462,19 @@ async function lookupCardInStock(store: Store, page: Page, link: Link) { } } + if (store.labels.inStock) { + const options = { + ...baseOptions, + requireVisible: true, + type: 'outerHTML' as const, + }; + + if (!(await pageIncludesLabels(page, store.labels.inStock, options))) { + logger.info(Print.outOfStock(link, store, true)); + return false; + } + } + return true; }