Skip to content

Commit

Permalink
fix: window 会在小程序里报错 (#2194)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck authored and sorrycc committed Sep 5, 2019
1 parent f964508 commit 617e678
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/dva-core/src/createStore.js
@@ -1,7 +1,7 @@
import { createStore, applyMiddleware, compose } from 'redux';
import flatten from 'flatten';
import invariant from 'invariant';
import window from 'global/window';
import win from 'global/window';
import { returnSelf, isArray } from './utils';

export default function({
Expand All @@ -27,8 +27,8 @@ export default function({
]);

const composeEnhancers =
process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, maxAge: 30 })
process.env.NODE_ENV !== 'production' && win.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? win.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, maxAge: 30 })
: compose;

const enhancers = [applyMiddleware(...middlewares), ...extraEnhancers];
Expand Down

0 comments on commit 617e678

Please sign in to comment.