Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check explicitly for production instead of development for dev tools (v0.5.20) #1037

Merged
merged 3 commits into from
Dec 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Expect active development and potentially significant breaking changes in the `0

- ...

### 0.5.20

- Attach to `window` for devtools if not in production, so that improperly configured environments do get the dev tools. [PR #1037](https://github.com/apollostack/apollo-client/pull/1037)

### 0.5.19
- Make sure stopped queries are not refetched on store reset [PR #960](https://github.com/apollostack/apollo-client/pull/960)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-client",
"version": "0.5.19",
"version": "0.5.20",
"description": "A simple yet functional GraphQL client.",
"main": "./lib/src/index.js",
"typings": "./lib/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default class ApolloClient {
// Attach the client instance to window to let us be found by chrome devtools, but only in
// development mode
const defaultConnectToDevTools =
typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'development' &&
typeof process === 'undefined' || (process.env && process.env.NODE_ENV !== 'production') &&
typeof window !== 'undefined' && (!(window as any).__APOLLO_CLIENT__);

if (typeof connectToDevTools === 'undefined') {
Expand Down