From a56475c371751a9425914dbc46707aeea4095c18 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Fri, 5 Oct 2018 16:02:41 -0400 Subject: [PATCH] Make window.navigator.userAgent check more defensive for React Native (#3975) --- packages/apollo-client/src/ApolloClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/apollo-client/src/ApolloClient.ts b/packages/apollo-client/src/ApolloClient.ts index 6c5bac03e08..b729fcc4319 100644 --- a/packages/apollo-client/src/ApolloClient.ts +++ b/packages/apollo-client/src/ApolloClient.ts @@ -171,6 +171,7 @@ export default class ApolloClient implements DataProxy { // Only for Chrome if ( window.navigator && + window.navigator.userAgent && window.navigator.userAgent.indexOf('Chrome') > -1 ) { // tslint:disable-next-line