Skip to content

Commit

Permalink
fix(dispose the pending request before retrieving the selectionRefere…
Browse files Browse the repository at this point in the history
…nces in order to creating a new instance of ReactRelayQueryFetcher)
  • Loading branch information
morrys committed May 13, 2019
1 parent 7b29f15 commit 4da2a7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-relay-offline",
"version": "0.1.2",
"version": "0.1.3",
"keywords": [
"graphql",
"relay",
Expand Down
4 changes: 2 additions & 2 deletions src/QueryRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ class QueryRenderer extends React.Component<Props, State> {
!areEqual(prevState.prevPropsVariables, nextProps.variables)
) {
const {query} = nextProps;
const prevSelectionReferences = (prevState.queryFetcher as QueryFetcherOriginal).getSelectionReferences();
(prevState.queryFetcher as QueryFetcherOriginal).disposeRequest();

const prevSelectionReferences = (prevState.queryFetcher as QueryFetcherOriginal).getSelectionReferences();

let queryFetcher;
if (query) {
const {getRequest} = nextProps.environment.unstable_internal;
Expand Down

0 comments on commit 4da2a7d

Please sign in to comment.