@factorypure/client-helpers 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -531,7 +531,7 @@ export const calculateHideReasons = (result, variant, variantScrapeOptions, vend
531
531
  }
532
532
  }
533
533
  const refurbishedKeywords = getRefurbishedKeywords(variant);
534
- const normalizedTitle = result.title.toLowerCase().replace(/[^a-z0-9-]/g, ' ');
534
+ const normalizedTitle = result?.title?.toLowerCase().replace(/[^a-z0-9-]/g, ' ') ?? '';
535
535
  const isRefurbished = refurbishedKeywords.some((keyword) => normalizedTitle.split(/\s+/).includes(keyword)) ||
536
536
  (result.details_and_offers && result.details_and_offers.includes('Pre-owned'));
537
537
  if (isRefurbished) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",