mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 02:57:34 +00:00
fix(lookup): check out of stock before price (#1422)
This commit is contained in:
+9
-9
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user