@ordergroove/offers 2.27.17 → 2.27.18

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.17",
3
+ "version": "2.27.18",
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": "982c709e906d0fe6f151bdd71d194363af85b60d"
48
+ "gitHead": "fcce550acc1ffde0668f93dbdb3a5dd595b665f5"
49
49
  }
@@ -2,7 +2,7 @@
2
2
  import { combineReducers } from 'redux';
3
3
  import * as constants from '../core/constants';
4
4
 
5
- import {
5
+ import baseReducer, {
6
6
  autoshipByDefault,
7
7
  auth,
8
8
  authUrl,
@@ -173,7 +173,6 @@ export const inStock = (state = {}, action) => {
173
173
  if (constants.REQUEST_OFFER === action.type && action.payload.product === null) {
174
174
  return { ...state };
175
175
  }
176
-
177
176
  return state;
178
177
  };
179
178
 
@@ -262,7 +261,7 @@ export const productPlans = (state = {}, action) => {
262
261
  return state;
263
262
  };
264
263
 
265
- export default combineReducers({
264
+ const reducer = combineReducers({
266
265
  auth,
267
266
  authUrl,
268
267
  autoshipByDefault,
@@ -289,3 +288,8 @@ export default combineReducers({
289
288
  sessionId,
290
289
  templates
291
290
  });
291
+
292
+ export default function shopifyReducer(state, action) {
293
+ if (window.og && window.og.previewMode) return baseReducer(state, action);
294
+ return reducer(state, action);
295
+ }