Skip to content

Commit

Permalink
Fix ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Mar 6, 2019
1 parent 5afa3a2 commit ef0d1d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/configure-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// TODO typing suck here a bit
import {createStore, compose, applyMiddleware, Store} from "redux";

const anyWindow = window as any;
const anyWindow: any = typeof window !== "undefined" ? window : undefined;

const composeWithDevTools =
typeof window !== "undefined" &&
anyWindow.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
anyWindow && anyWindow.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? anyWindow.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
: function(...args: any[]) {
if (args.length === 0) return undefined;
Expand Down

0 comments on commit ef0d1d5

Please sign in to comment.