From 3a2cf3d9b67993facc3fb38f7f6700a9e98ec422 Mon Sep 17 00:00:00 2001 From: iyarsius Date: Mon, 16 May 2022 13:09:02 +0200 Subject: [PATCH] Fixed size error --- package.json | 2 +- src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ec74856..be2b47f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stockx-scraper", - "version": "1.6.3", + "version": "1.6.5", "description": "Scrape sneakers data from stockx with dynamic parmeters like proxy (static or rotating), country and currency.", "main": "./src/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index a17acb9..82357ad 100644 --- a/src/index.js +++ b/src/index.js @@ -67,7 +67,9 @@ module.exports = { for (const key in variants) { const shoe = variants[key] - const sizeData = shoe.sizeChart.baseSize; + const sizeData = shoe.sizeChart?.baseSize; + + if (!sizeData) continue; const usSize = sizeData.replace(/[A-Z]|[a-z]/g, "") let sizeConverter = convert.men.find(s => s.us === usSize)