From 5e0eabd0e9f9978b1f89b1a1159bf5e97a484fa4 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 17 Jun 2022 12:50:32 +0700 Subject: [PATCH] fix(AuditLog): default changes to empty array v13.8.1 --- src/structures/GuildAuditLogs.js | 4 ++-- typings/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/GuildAuditLogs.js b/src/structures/GuildAuditLogs.js index 3937184..48086c3 100644 --- a/src/structures/GuildAuditLogs.js +++ b/src/structures/GuildAuditLogs.js @@ -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 diff --git a/typings/index.d.ts b/typings/index.d.ts index 80a01e0..0e08852 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1122,7 +1122,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;