From 0821acfa999913f7dd8f20ae3f22d65f5f715f7c Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Tue, 9 Jan 2018 22:17:46 +0200 Subject: [PATCH] Fix iter issues (#2237) --- src/util/Collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index b95af8562..91528afae 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -85,7 +85,7 @@ class Collection extends Map { if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.'); count = Math.min(this.size, count); const arr = new Array(count); - const iter = this.iter(); + const iter = this.keys(); for (let i = 0; i < count; i++) arr[i] = iter.next().value; return arr; }