Skip to content

Commit

Permalink
Move the if inside the setTimeout to outside of it
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jul 23, 2024
1 parent cef8ebb commit 6a52c58
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/core/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,13 @@ export class ApolloClient<TCacheShape> implements DataProxy {
*/
if (!hasSuggestedDevtools && __DEV__) {
hasSuggestedDevtools = true;
setTimeout(() => {
if (
window.document &&
window.top === window.self &&
!(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__ &&
/^(https?|file):$/.test(window.location.protocol)
) {
if (
window.document &&
window.top === window.self &&
!(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__ &&
/^(https?|file):$/.test(window.location.protocol)
) {
setTimeout(() => {
const nav = window.navigator;
const ua = nav && nav.userAgent;
let url: string | undefined;
Expand All @@ -369,8 +369,8 @@ export class ApolloClient<TCacheShape> implements DataProxy {
url
);
}
}
}, 10000);
}, 10000);
}
}
}

Expand Down

0 comments on commit 6a52c58

Please sign in to comment.