Skip to content

Commit

Permalink
Fix totalCount in querying
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Feb 16, 2010
1 parent ace03a3 commit f1c51f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resource-query.js
Expand Up @@ -181,7 +181,7 @@ exports.executeQuery = function(query, options, target){
var results = eval(js + "target;"); var results = eval(js + "target;");
if(options.start || options.end){ if(options.start || options.end){
var totalCount = results.length; 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; results.totalCount = totalCount;
} }
return results; return results;
Expand Down

0 comments on commit f1c51f2

Please sign in to comment.