Add NOT_AVAILABLE to ignored states!

main
Ibraheem Saleh 10 months ago
parent 3c617ca816
commit 1d1dc4cabd

@ -169,7 +169,7 @@ async function pollStore(zip, store) {
) { ) {
const buttonState = data.data.productBySkuId.fulfillmentOptions.buttonStates[0].buttonState; const buttonState = data.data.productBySkuId.fulfillmentOptions.buttonStates[0].buttonState;
console.log(`skuId: ${skuId} Store: ${store} Ship to: ${zip} -> buttonState: ${buttonState}`); console.log(`skuId: ${skuId} Store: ${store} Ship to: ${zip} -> buttonState: ${buttonState}`);
if (buttonState !== "SOLD_OUT") { if (buttonState !== "SOLD_OUT" && buttonState !== "NOT_AVAILABLE") {
found = true; found = true;
const productUrl = getProductUrl(skuId); const productUrl = getProductUrl(skuId);
console.log(productUrl); console.log(productUrl);

Loading…
Cancel
Save