Skip to content

Commit

Permalink
Fix navigator undefined on React Native
Browse files Browse the repository at this point in the history
Fixes #3137
  • Loading branch information
radko93 authored and peggyrayzis committed Mar 22, 2018
1 parent d2bc92f commit 3261c5e
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 3261c5e

Please sign in to comment.