refactor: compare with undefined directly (#9191)

* refactor: compare with `undefined` directly

* fix: lint
This commit is contained in:
Almeida
2023-03-12 20:24:22 +00:00
committed by GitHub
parent 955e8fe312
commit 869153c3fd
29 changed files with 69 additions and 77 deletions

View File

@@ -389,7 +389,7 @@ class ApplicationCommand extends Base {
// TODO: remove ?? 0 on each when nullable
(command.options?.length ?? 0) !== (this.options?.length ?? 0) ||
defaultMemberPermissions !== (this.defaultMemberPermissions?.bitfield ?? null) ||
(typeof dmPermission !== 'undefined' && dmPermission !== this.dmPermission) ||
(dmPermission !== undefined && dmPermission !== this.dmPermission) ||
!isEqual(command.nameLocalizations ?? command.name_localizations ?? {}, this.nameLocalizations ?? {}) ||
!isEqual(
command.descriptionLocalizations ?? command.description_localizations ?? {},