Skip to content

Commit 010fb86

Browse files
fix(overmind): fix issue with react native not having location
1 parent 4ddf1a4 commit 010fb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node_modules/overmind/src/Devtools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Devtools {
2323
private reconnectInterval: number = 10000
2424
private name: string
2525
constructor(name: string) {
26-
this.name = location.search.includes('OVERMIND_DEVTOOL') ? name + ' (Overmind Devtool)' : name
26+
this.name = typeof location !== 'undefined' && location.search.includes('OVERMIND_DEVTOOL') ? name + ' (Overmind Devtool)' : name
2727
}
2828
connect = (host: string, onMessage: (message: Message) => void) => {
2929
host = host || 'localhost:3031'

0 commit comments

Comments
 (0)