From 33edb4a0d1170d95f7c10cf9f0c596062afab885 Mon Sep 17 00:00:00 2001 From: ThiefMaster Date: Thu, 16 May 2013 22:45:54 +0200 Subject: [PATCH] Don't use for..in for n array Every time you use for..in for an Array, Justin Beiber kills a kitten. --- server/configuration.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.25.1