Skip to content
Browse files

Reduce size of Count method.

  • Loading branch information...
1 parent 0836723 commit 627d0b806a224af015be374d5220696645892313 @scottgonzalez scottgonzalez committed May 5, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/JSLINQ.js
View
5 lib/JSLINQ.js
@@ -77,10 +77,7 @@
return new JSLINQ(r);
},
Count: function(clause) {
- if (clause == null)
- return this.items.length;
- else
- return this.Where(clause).items.length;
+ return (clause == null ? this : this.Where(clause)).items.length;
},
Distinct: function(clause) {
var item;

0 comments on commit 627d0b8

Please sign in to comment.
Something went wrong with that request. Please try again.