mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
Fix iter issues (#2237)
This commit is contained in:
parent
d94ead70f8
commit
0821acfa99
1 changed files with 1 additions and 1 deletions
|
|
@ -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.');
|
if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');
|
||||||
count = Math.min(this.size, count);
|
count = Math.min(this.size, count);
|
||||||
const arr = new Array(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;
|
for (let i = 0; i < count; i++) arr[i] = iter.next().value;
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue