Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Make sure that onQuery() is called even if the queries list is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick committed Apr 6, 2015
1 parent 1f5a7f6 commit 320221c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-transmit",
"description": "Relay-inspired library based on Promises instead of GraphQL.",
"version": "2.5.2",
"version": "2.5.3",
"license": "BSD-3",
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions src/lib/createContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ module.exports = function (Component, options) {
if (!this.hasQueryResults()) {
this.setQueryParams({});
}
else if (this.props.onQuery) {
this.props.onQuery.call(this, Promise.resolve({}));
}
},
setQueryParams: function (nextParams, optionalQueryName) {
var _this = this;
Expand Down

0 comments on commit 320221c

Please sign in to comment.