fix(AuditLog): default changes to empty array (#7880)

This commit is contained in:
Ryan Munro
2022-05-12 18:26:07 +10:00
committed by GitHub
parent 4ba0f56b6a
commit 19eaed6390
2 changed files with 3 additions and 3 deletions

View File

@@ -116,9 +116,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

View File

@@ -1213,7 +1213,7 @@ export class GuildAuditLogsEntry<
public static Targets: GuildAuditLogsTargets;
public action: TAction;
public actionType: TActionType;
public changes: AuditLogChange[] | null;
public changes: AuditLogChange[];
public get createdAt(): Date;
public get createdTimestamp(): number;
public executor: User | null;