@ordergroove/offers 2.27.19-alpha-PR-659-2.1 → 2.27.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordergroove/offers",
3
- "version": "2.27.19-alpha-PR-659-2.1+ce990eef",
3
+ "version": "2.27.19",
4
4
  "description": "offer state component",
5
5
  "author": "Eugenio Lattanzio <eugenio63@gmail.com>",
6
6
  "homepage": "https://github.com/ordergroove/plush-toys#readme",
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@ordergroove/offers-templates": "^0.4.15"
47
47
  },
48
- "gitHead": "ce990eef6d106e43adf08c563903844bd8d45e13"
48
+ "gitHead": "a2212dedd4f9967228b5ee7043e844ba675ed0e2"
49
49
  }
package/src/core/utils.ts CHANGED
@@ -49,15 +49,15 @@ export const safeProductId = product => {
49
49
  /**
50
50
  * Returns the OG frequency if platform is running on selling plans
51
51
  * @param initialFrequency
52
- * @param param1
52
+ * @param config
53
53
  */
54
54
  export const safeOgFrequency = (initialFrequency, config) => {
55
- if (platform?.shopify_selling_plans) {
56
- const ix = config?.frequencies?.indexOf(initialFrequency);
57
- if (ix >= 0 && config?.frequenciesEveryPeriod[ix]) {
58
- return config?.frequenciesEveryPeriod[ix];
55
+ if (platform.shopify_selling_plans) {
56
+ const ix = config.frequencies?.indexOf(initialFrequency);
57
+ if (ix >= 0 && config.frequenciesEveryPeriod[ix]) {
58
+ return config.frequenciesEveryPeriod[ix];
59
59
  } else {
60
- throw `OG Can't convert selling_plain_id ${initialFrequency} to OG frequency every period`;
60
+ throw `OG Can't convert selling_plan_id ${initialFrequency} to OG frequency every period`;
61
61
  }
62
62
  }
63
63
  return initialFrequency;