Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
fix refetch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Aug 13, 2016
1 parent 6bdcff7 commit 9836ef6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Expect active development and potentially significant breaking changes in the `0.x` track. We'll try to be diligent about releasing a `1.0` version in a timely fashion (ideally within 1 or 2 months), so that we can take advantage of SemVer to signify breaking changes from that point on.

### v4.0.2

- Bug: Fixed refetch methods when no result is returned

### v4.0.1

- BREAKING Feature: [Brand new API! See the docs for more information](http://docs.apollostack.com/apollo-client/react.html);
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": "react-apollo",
"version": "0.4.1",
"version": "0.4.2",
"description": "React data container for Apollo Client",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export default function graphql(
// XXX why doesn't apollo-client fire next on a refetch with the same data?
return refetchMethod(vars, ...args)
.then((result) => {
if (isEqual(result.data, oldData)) next(result);
if (result && isEqual(result.data, oldData)) next(result);
return result;
});
};
Expand Down

0 comments on commit 9836ef6

Please sign in to comment.