mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Using a traditional for loop rather than a for in loop for options.files (#1461)
This commit is contained in:
@@ -112,7 +112,7 @@ class Webhook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.files) {
|
if (options.files) {
|
||||||
for (const i in options.files) {
|
for (let i = 0; i < options.files.length; i++) {
|
||||||
let file = options.files[i];
|
let file = options.files[i];
|
||||||
if (typeof file === 'string') file = { attachment: file };
|
if (typeof file === 'string') file = { attachment: file };
|
||||||
if (!file.name) {
|
if (!file.name) {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class TextBasedChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.files) {
|
if (options.files) {
|
||||||
for (const i in options.files) {
|
for (let i = 0; i < options.files.length; i++) {
|
||||||
let file = options.files[i];
|
let file = options.files[i];
|
||||||
if (typeof file === 'string') file = { attachment: file };
|
if (typeof file === 'string') file = { attachment: file };
|
||||||
if (!file.name) {
|
if (!file.name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user