mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
refactor: use optional chaining (#6757)
This commit is contained in:
@@ -48,7 +48,7 @@ class APIRequest {
|
||||
if (this.options.headers) headers = Object.assign(headers, this.options.headers);
|
||||
|
||||
let body;
|
||||
if (this.options.files && this.options.files.length) {
|
||||
if (this.options.files?.length) {
|
||||
body = new FormData();
|
||||
for (const file of this.options.files) {
|
||||
if (file?.file) body.append(file.key ?? file.name, file.file, file.name);
|
||||
|
||||
Reference in New Issue
Block a user