Skip to content

Commit

Permalink
Error when exec is called on empty query.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Ashworth committed May 2, 2013
1 parent 153b432 commit cda1975
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ _.extend(execution, {
* Execute the query by passing off to the action matching the query type.
*/
exec: function (cb) {
if (!this.type) return cb(new Error("Empty query."), []);
this.actions[this.type].call(this, cb);
return this;
}
Expand Down

0 comments on commit cda1975

Please sign in to comment.