diff --git a/src/linq/operators/takeoperator.ts b/src/linq/operators/takeoperator.ts index e10fa43..54d2681 100644 --- a/src/linq/operators/takeoperator.ts +++ b/src/linq/operators/takeoperator.ts @@ -13,6 +13,9 @@ export class TakeOperator extends Operator { break; yield item; + + if (idx == this.count && this.removed == false) + break; } } @@ -24,6 +27,9 @@ export class TakeOperator extends Operator { break; yield item; + + if (idx == this.count && this.removed == false) + break; } } } \ No newline at end of file