@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.
- package/dist/index.js +1 -1
- 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
|
|
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) {
|