diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c57b3dfce4..224dc760fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 168ecf59113..488e4e4a61c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/ApolloClient.ts b/src/ApolloClient.ts index 939ac3451c6..2a7d30134d1 100644 --- a/src/ApolloClient.ts +++ b/src/ApolloClient.ts @@ -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') {