Skip to content

Commit

Permalink
false devtools shouldn't try to initializeDevtools
Browse files Browse the repository at this point in the history
Localhost should connect unless devtools is false
  • Loading branch information
corlaez committed Dec 23, 2018
1 parent ca48e27 commit ff3f902
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 ff3f902

Please sign in to comment.