Skip to content

Commit

Permalink
Fix navigator undefined on React Native
Browse files Browse the repository at this point in the history
  • Loading branch information
radko93 authored Mar 16, 2018
1 parent a4548b0 commit 72f619c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apollo-client/src/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class ApolloClient<TCacheShape> implements DataProxy {
typeof (window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__ === 'undefined'
) {
// Only for Chrome
if (navigator.userAgent.indexOf('Chrome') > -1) {
if (window.navigator && window.navigator.userAgent.indexOf('Chrome') > -1) {
// tslint:disable-next-line
console.debug(
'Download the Apollo DevTools ' +
Expand Down

0 comments on commit 72f619c

Please sign in to comment.