mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat: return entries instead of values in toJSON method (#9345)
* feat(collection): return entries instead of values in toJSON method * test: adjust test --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -933,7 +933,7 @@ export class Collection<K, V> extends Map<K, V> {
|
||||
|
||||
public toJSON() {
|
||||
// toJSON is called recursively by JSON.stringify.
|
||||
return [...this.values()];
|
||||
return [...this.entries()];
|
||||
}
|
||||
|
||||
private static defaultSort<V>(firstValue: V, secondValue: V): number {
|
||||
|
||||
Reference in New Issue
Block a user