mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
Using a traditional for loop rather than a for in loop for options.files (#1461)
This commit is contained in:
parent
e66fa145d2
commit
5bfc688bb0
2 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue