Skip to content

Commit

Permalink
fix(SelectMenuInteraction): set values to empty array if not provided (
Browse files Browse the repository at this point in the history
  • Loading branch information
monbrey committed Jul 5, 2021
1 parent 1a27f57 commit 34708d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/structures/SelectMenuInteraction.js
Expand Up @@ -14,7 +14,7 @@ class SelectMenuInteraction extends MessageComponentInteraction {
* The values selected, if the component which was interacted with was a select menu
* @type {string[]}
*/
this.values = this.componentType === 'SELECT_MENU' ? data.data.values : null;
this.values = data.data.values ?? [];
}
}

Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Expand Up @@ -1367,7 +1367,7 @@ export class Role extends Base {

export class SelectMenuInteraction extends MessageComponentInteraction {
public componentType: 'SELECT_MENU';
public values: string[] | null;
public values: string[];
}

export class Shard extends EventEmitter {
Expand Down

0 comments on commit 34708d6

Please sign in to comment.