Permalink
Browse files

Fix totalCount in querying

  • Loading branch information...
1 parent ace03a3 commit f1c51f2ca593489ee6cbab570f6aca0fafe2487f @kriszyp kriszyp committed Feb 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/resource-query.js
View
2 lib/resource-query.js
@@ -181,7 +181,7 @@ exports.executeQuery = function(query, options, target){
var results = eval(js + "target;");
if(options.start || options.end){
var totalCount = results.length;
- results = results.slice(options.start || 0, (options.end || Infinity));
+ results = results.slice(options.start || 0, (options.end || Infinity) + 1);
results.totalCount = totalCount;
}
return results;

0 comments on commit f1c51f2

Please sign in to comment.