Skip to content

Commit

Permalink
quick optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
lostfields committed Dec 16, 2020
1 parent 27e7d15 commit 1e821ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/linq/operators/takeoperator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export class TakeOperator<TEntity> extends Operator<TEntity> {
break;

yield item;

if (idx == this.count && this.removed == false)
break;
}
}

Expand All @@ -24,6 +27,9 @@ export class TakeOperator<TEntity> extends Operator<TEntity> {
break;

yield item;

if (idx == this.count && this.removed == false)
break;
}
}
}

0 comments on commit 1e821ef

Please sign in to comment.