Skip to content

Commit 61d9993

Browse files
Merge pull request cerebral#170 from lrn2prgrm/patch-1
false devtools shouldn't try to initializeDevtools
2 parents a200446 + ff3f902 commit 61d9993

File tree

1 file changed

+2
-6
lines changed
  • packages/node_modules/overmind/src

1 file changed

+2
-6
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,8 @@ export class Overmind<Config extends Configuration> implements Configuration {
105105
The action factory function
106106
*/
107107

108-
if (
109-
!IS_PRODUCTION &&
110-
options.devtools !== false &&
111-
typeof window !== 'undefined'
112-
) {
113-
if (location.hostname === 'localhost' || options.devtools) {
108+
if (!IS_PRODUCTION && typeof window !== 'undefined') {
109+
if (options.devtools || (location.hostname === 'localhost' && options.devtools !== false)) {
114110
this.initializeDevtools(options.devtools, eventHub, proxyStateTree)
115111
} else {
116112
console.warn(

0 commit comments

Comments
 (0)