Skip to content

Commit

Permalink
fix(AuditLog): default changes to empty array (#8076)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Jun 13, 2022
1 parent 0d0190a commit 3095f35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/structures/GuildAuditLogs.js
Expand Up @@ -398,9 +398,9 @@ class GuildAuditLogsEntry {

/**
* Specific property changes
* @type {?AuditLogChange[]}
* @type {AuditLogChange[]}
*/
this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? null;
this.changes = data.changes?.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) ?? [];

/**
* The entry's id
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Expand Up @@ -1060,7 +1060,7 @@ export class GuildAuditLogsEntry<
private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData);
public action: TAction;
public actionType: TActionType;
public changes: AuditLogChange[] | null;
public changes: AuditLogChange[];
public readonly createdAt: Date;
public readonly createdTimestamp: number;
public executor: User | null;
Expand Down

0 comments on commit 3095f35

Please sign in to comment.