mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
fix: don't mutate user provided array (#10014)
* fix(builders): don't mutate user provided array * test: add normalize array tests * chore: revert vscode autochange * Update util.test.ts * refactor: remove unnecessary clone --------- Co-authored-by: Vlad Frangu <me@vladfrangu.dev> Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
@@ -110,7 +110,7 @@ export class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder<APIMenti
|
||||
) {
|
||||
const normalizedValues = normalizeArray(values);
|
||||
optionsLengthValidator.parse(normalizedValues.length);
|
||||
this.data.default_values = normalizedValues.slice();
|
||||
this.data.default_values = normalizedValues;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user