diff --git a/.changeset/gold-pears-march.md b/.changeset/gold-pears-march.md new file mode 100644 index 00000000000..61c37d94328 --- /dev/null +++ b/.changeset/gold-pears-march.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Don’t prompt for DevTools installation for browser extension page diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index 42daf602226..05e713d520a 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -313,7 +313,8 @@ export class ApolloClient implements DataProxy { typeof window !== "undefined" && window.document && window.top === window.self && - !(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__ + !(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__ && + /^(https?|file):$/.test(window.location.protocol) ) { const nav = window.navigator; const ua = nav && nav.userAgent;