From 5bfc688bb04940fe1133252d5342e320dd3bf445 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Sat, 6 May 2017 01:09:01 +0200 Subject: [PATCH] Using a traditional for loop rather than a for in loop for options.files (#1461) --- src/structures/Webhook.js | 2 +- src/structures/interfaces/TextBasedChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 509de2e66..bf997008e 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -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) { diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index f7fde7319..8fb7995ec 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -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) {