fix: remove for..in in favor of Object.keys (#3745)

This commit is contained in:
SpaceEEC
2020-01-31 12:38:47 +01:00
committed by GitHub
parent ab7f9e80b4
commit 6d7e1e4953
5 changed files with 5 additions and 5 deletions

View File

@@ -238,7 +238,7 @@ class RESTMethods {
include_nsfw: options.nsfw,
};
for (const key in options) if (options[key] === undefined) delete options[key];
for (const key of Object.keys(options)) if (options[key] === undefined) delete options[key];
const queryString = (querystring.stringify(options).match(/[^=&?]+=[^=&?]+/g) || []).join('&');
let endpoint;