Skip to content

Commit

Permalink
Don’t prompt for DevTools installation for browser extension page (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-kinokon committed May 13, 2024
1 parent dff15b1 commit 8475346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gold-pears-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Don’t prompt for DevTools installation for browser extension page
3 changes: 2 additions & 1 deletion src/core/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export class ApolloClient<TCacheShape> 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;
Expand Down

0 comments on commit 8475346

Please sign in to comment.