From fc626a672410d8990eefb748f59d3a5ab5027c2d Mon Sep 17 00:00:00 2001 From: Christoph (Sheogorath) Kern Date: Fri, 22 Dec 2017 12:19:19 +0100 Subject: Simplify loop --- lib/config/index.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/config/index.js b/lib/config/index.js index 6ed652ad..eb59db03 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -95,14 +95,9 @@ config.isLDAPEnable = config.ldap.url config.isPDFExportEnable = config.allowpdfexport // generate correct path -config.sslcapath = (function () { - var i, len, results - results = [] - for (i = 0, len = config.sslcapath.length; i < len; i++) { - results.push(path.resolve(appRootPath, config.sslcapath[i])) - } - return results -})() +config.sslcapath.forEach(function (capath, i, array) { + array[i] = path.resolve(appRootPath, capath) +}) config.sslcertpath = path.join(appRootPath, config.sslcertpath) config.sslkeypath = path.join(appRootPath, config.sslkeypath) -- cgit v1.2.3