mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Fix iter issues (#2237)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user