Skip to content

Commit

Permalink
Nullish check devtools.enabled (#12093)
Browse files Browse the repository at this point in the history
Co-authored-by: Jerel Miller <[email protected]>
  • Loading branch information
mgmolisani and jerelmiller authored Nov 11, 2024
1 parent 014b6aa commit 1765668
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-sheep-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": patch
---

Fixed a bug when evaluating the devtools flag with the new syntax `devtools.enabled` that could result to `true` when explicitly set to `false`.
4 changes: 2 additions & 2 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 40266,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 33060
"dist/apollo-client.min.cjs": 40269,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 33061
}
2 changes: 1 addition & 1 deletion src/core/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class ApolloClient<TCacheShape> implements DataProxy {
this.typeDefs = typeDefs;
this.devtoolsConfig = {
...devtools,
enabled: devtools?.enabled || connectToDevTools,
enabled: devtools?.enabled ?? connectToDevTools,
};

if (this.devtoolsConfig.enabled === undefined) {
Expand Down

0 comments on commit 1765668

Please sign in to comment.