File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,14 @@ export class Overmind<Config extends Configuration> implements Configuration {
193193 location . hostname === 'localhost' &&
194194 options . devtools !== false )
195195 ) {
196- this . initializeDevtools (
197- options . devtools === true ? 'localhost:3031' : options . devtools ,
198- eventHub ,
199- proxyStateTree
200- )
196+ const host =
197+ options . devtools === true ? 'localhost:3031' : options . devtools
198+ const name =
199+ options . name || typeof document === 'undefined'
200+ ? 'NoName'
201+ : document . title || 'NoName'
202+
203+ this . initializeDevtools ( host , name , eventHub , proxyStateTree )
201204 } else {
202205 warning +=
203206 '\n\n - You are not running on localhost. You will have to manually define the devtools option to connect'
@@ -500,10 +503,8 @@ export class Overmind<Config extends Configuration> implements Configuration {
500503 return result
501504 } )
502505 }
503- private initializeDevtools ( host , eventHub , proxyStateTree ) {
504- const devtools = new Devtools (
505- typeof document === 'undefined' ? 'NoName' : document . title || 'NoName'
506- )
506+ private initializeDevtools ( host , name , eventHub , proxyStateTree ) {
507+ const devtools = new Devtools ( name )
507508 devtools . connect (
508509 host ,
509510 ( message : Message ) => {
You can’t perform that action at this time.
0 commit comments