diff --git a/src/store/lookup.ts b/src/store/lookup.ts index 3ef27c5..1f75bf1 100644 --- a/src/store/lookup.ts +++ b/src/store/lookup.ts @@ -347,6 +347,15 @@ async function lookupCardInStock(store: Store, page: Page, link: Link) { } } + if (store.labels.outOfStock) { + if ( + await pageIncludesLabels(page, store.labels.outOfStock, baseOptions) + ) { + logger.info(Print.outOfStock(link, store, true)); + return false; + } + } + if (store.labels.maxPrice) { const maxPrice = config.store.maxPrice.series[link.series]; @@ -367,15 +376,6 @@ async function lookupCardInStock(store: Store, page: Page, link: Link) { // return store.realTimeInventoryLookup(link.itemNumber); // } - if (store.labels.outOfStock) { - if ( - await pageIncludesLabels(page, store.labels.outOfStock, baseOptions) - ) { - logger.info(Print.outOfStock(link, store, true)); - return false; - } - } - if (store.labels.inStock) { const options = { ...baseOptions,