Skip to content

Commit

Permalink
Merge pull request #170 from lrn2prgrm/patch-1
Browse files Browse the repository at this point in the history
false devtools shouldn't try to initializeDevtools
  • Loading branch information
christianalfoni authored Dec 23, 2018
2 parents a200446 + ff3f902 commit 61d9993
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/node_modules/overmind/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,8 @@ export class Overmind<Config extends Configuration> implements Configuration {
The action factory function
*/

if (
!IS_PRODUCTION &&
options.devtools !== false &&
typeof window !== 'undefined'
) {
if (location.hostname === 'localhost' || options.devtools) {
if (!IS_PRODUCTION && typeof window !== 'undefined') {
if (options.devtools || (location.hostname === 'localhost' && options.devtools !== false)) {
this.initializeDevtools(options.devtools, eventHub, proxyStateTree)
} else {
console.warn(
Expand Down

0 comments on commit 61d9993

Please sign in to comment.