File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1169,8 +1169,9 @@ export class ApolloClient {
11691169 */
11701170 if ( ! hasSuggestedDevtools && __DEV__ ) {
11711171 hasSuggestedDevtools = true ;
1172+ const win = window ;
11721173
1173- const ua = window . navigator . userAgent ;
1174+ const ua = win . navigator . userAgent ;
11741175 let url : string | undefined ;
11751176
11761177 if ( typeof ua === "string" ) {
@@ -1185,13 +1186,13 @@ export class ApolloClient {
11851186 }
11861187
11871188 if (
1188- window . document &&
1189- window . top === window . self &&
1190- / ^ ( h t t p s ? | f i l e ) : $ / . test ( window . location . protocol ) &&
1189+ win . document &&
1190+ win . top === win . self &&
1191+ / ^ ( h t t p s ? | f i l e ) : $ / . test ( win . location . protocol ) &&
11911192 url
11921193 ) {
11931194 setTimeout ( ( ) => {
1194- if ( ! ( window as any ) . __APOLLO_DEVTOOLS_GLOBAL_HOOK__ ) {
1195+ if ( ! ( win as any ) . __APOLLO_DEVTOOLS_GLOBAL_HOOK__ ) {
11951196 invariant . log (
11961197 "Download the Apollo DevTools for a better development " +
11971198 "experience: %s" ,
You can’t perform that action at this time.
0 commit comments