@factorypure/client-helpers 1.0.24 → 1.0.25

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 +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -601,7 +601,8 @@ export const calculateHideReasons = (result, variant, variantScrapeOptions) => {
601
601
  export const calculateHideOverrideReasons = (result, variant) => {
602
602
  const hide_override_reasons = [];
603
603
  // Match SKU as a whole word or inside parentheses/brackets
604
- const skuRegex = new RegExp(`(?:\\b|[\\(\\[\\{])${variant.sku}(?:\\b|[\\)\\]\\}])`, 'gi');
604
+ const escapedSku = variant.sku.replace(/\+/g, '\\+');
605
+ const skuRegex = new RegExp(`(?:\\b|[\\(\\[\\{])${escapedSku}(?:\\b|[\\)\\]\\}])`, 'gi');
605
606
  if (skuRegex.test(result.title)) {
606
607
  hide_override_reasons.push('SKU Match');
607
608
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",