From 59ba9abccfe30210eac42eb7a5df0eb626cebf6f Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 5 Mar 2024 11:21:08 +1100 Subject: [PATCH] Use ??= instead of ternary operator --- src/events/channelUpdate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/channelUpdate.ts b/src/events/channelUpdate.ts index 6a37b00..6d7692a 100644 --- a/src/events/channelUpdate.ts +++ b/src/events/channelUpdate.ts @@ -13,7 +13,7 @@ export default class ChannelUpdate { if (auditChupdate.changes.length > 0) { const changes = auditChupdate.changes; - const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old === undefined ? 'None' : auditValue.old} ➜ ${auditValue.new === '' ? 'None' : auditValue.new}`; + const formatAudit =(auditValue:Discord.AuditLogChange)=>`${auditValue.old ??= 'None'} ➜ ${auditValue.new ??= 'None'}`; embed.setTitle(`\`${oldChannel.name}\` was updated`).setTimestamp(auditChupdate.createdTimestamp); for (const change of changes) {