From: ThiefMaster Date: Thu, 16 May 2013 20:45:54 +0000 (+0200) Subject: Don't use for..in for n array X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=33edb4a0d1170d95f7c10cf9f0c596062afab885;p=KiwiIRC.git Don't use for..in for n array Every time you use for..in for an Array, Justin Beiber kills a kitten. --- diff --git a/server/configuration.js b/server/configuration.js index 02961ca..be89037 100644 --- a/server/configuration.js +++ b/server/configuration.js @@ -8,10 +8,11 @@ var config_filename = 'config.js', function loadConfig() { var new_config, - conf_filepath; + conf_filepath, + i; // Loop through the possible config paths and find a usable one - for (var i in config_dirs) { + for (i = 0; i < config_dirs.length; i++) { conf_filepath = config_dirs[i] + config_filename; try { @@ -57,4 +58,4 @@ module.exports.get = function (specific_environment) { return loaded_config[specific_environment] || {}; }; -module.exports.loadConfig = loadConfig; \ No newline at end of file +module.exports.loadConfig = loadConfig;