@apollo/client 4.2.7 → 4.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/__cjs/version.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.build = exports.version = void 0;
4
- exports.version = "4.2.7";
4
+ exports.version = "4.2.8";
5
5
  exports.build = "cjs";
6
6
  //# sourceMappingURL=version.cjs.map
@@ -141,29 +141,28 @@ export class ApolloClient {
141
141
  */
142
142
  if (!hasSuggestedDevtools && __DEV__) {
143
143
  hasSuggestedDevtools = true;
144
- if (window.document &&
145
- window.top === window.self &&
146
- /^(https?|file):$/.test(window.location.protocol)) {
144
+ const win = window;
145
+ const ua = win.navigator.userAgent;
146
+ let url;
147
+ if (typeof ua === "string") {
148
+ if (ua.indexOf("Chrome/") > -1) {
149
+ url =
150
+ "https://chrome.google.com/webstore/detail/" +
151
+ "apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";
152
+ }
153
+ else if (ua.indexOf("Firefox/") > -1) {
154
+ url =
155
+ "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";
156
+ }
157
+ }
158
+ if (win.document &&
159
+ win.top === win.self &&
160
+ /^(https?|file):$/.test(win.location.protocol) &&
161
+ url) {
147
162
  setTimeout(() => {
148
- if (!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
149
- const nav = window.navigator;
150
- const ua = nav && nav.userAgent;
151
- let url;
152
- if (typeof ua === "string") {
153
- if (ua.indexOf("Chrome/") > -1) {
154
- url =
155
- "https://chrome.google.com/webstore/detail/" +
156
- "apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";
157
- }
158
- else if (ua.indexOf("Firefox/") > -1) {
159
- url =
160
- "https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";
161
- }
162
- }
163
- if (url) {
164
- __DEV__ && invariant.log("Download the Apollo DevTools for a better development " +
165
- "experience: %s", url);
166
- }
163
+ if (!win.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
164
+ __DEV__ && invariant.log("Download the Apollo DevTools for a better development " +
165
+ "experience: %s", url);
167
166
  }
168
167
  }, 10000);
169
168
  }