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

This commit is contained in:
Crawl
2017-05-06 01:14:27 +02:00
parent 1e115efa56
commit fd7cb41ee6
2 changed files with 17 additions and 9 deletions

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) {