Using a traditional for loop rather than a for in loop for options.files (#1461)

This commit is contained in:
SpaceEEC
2017-05-06 01:09:01 +02:00
committed by Crawl
parent e66fa145d2
commit 5bfc688bb0
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ class Webhook {
}
if (options.files) {
for (const i in options.files) {
for (let i = 0; i < options.files.length; i++) {
let file = options.files[i];
if (typeof file === 'string') file = { attachment: file };
if (!file.name) {

View File

@@ -88,7 +88,7 @@ class TextBasedChannel {
}
if (options.files) {
for (const i in options.files) {
for (let i = 0; i < options.files.length; i++) {
let file = options.files[i];
if (typeof file === 'string') file = { attachment: file };
if (!file.name) {