Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Commit

Permalink
Changed getRoutesAndStore to use __WEB__ instead of variable
Browse files Browse the repository at this point in the history
Fixes a edge case when doing local development.
  • Loading branch information
dlmr committed Oct 6, 2016
1 parent 72b9810 commit 2738dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extensions/roc-package-web-app-react/app/default/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createClient } from '../client';

import getRoutesAndStore from './get-routes-and-store';

const { store, routes } = getRoutesAndStore(true);
const { store, routes } = getRoutesAndStore();

createClient({
createRoutes: routes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* global REACT_ROUTER_ROUTES, REDUX_REDUCERS, HAS_REDUX_REDUCERS, HAS_REDUX_MIDDLEWARES, REDUX_MIDDLEWARES,
USE_DEFAULT_REDUX_REDUCERS, USE_DEFAULT_REDUX_MIDDLEWARES, USE_DEFAULT_REACT_ROUTER_ROUTES
USE_DEFAULT_REDUX_REDUCERS, USE_DEFAULT_REDUX_MIDDLEWARES, USE_DEFAULT_REACT_ROUTER_ROUTES, __WEB__
*/
/* eslint-disable global-require */

export default function getRoutesAndStore(web = false) {
export default function getRoutesAndStore() {
let store = null;
let routes = null;

Expand Down Expand Up @@ -35,7 +35,7 @@ export default function getRoutesAndStore(web = false) {
);

let replaceReducers = null;
if (web) {
if (__WEB__) {
replaceReducers = (replaceReducer) => {
module.hot.accept(require.resolve(REDUX_REDUCERS), () => {
replaceReducer({
Expand Down

0 comments on commit 2738dc4

Please sign in to comment.