Skip to content

Commit fc626a6

Browse files
authored
Simplify loop
1 parent 9949795 commit fc626a6

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/config/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,9 @@ config.isLDAPEnable = config.ldap.url
9595
config.isPDFExportEnable = config.allowpdfexport
9696

9797
// generate correct path
98-
config.sslcapath = (function () {
99-
var i, len, results
100-
results = []
101-
for (i = 0, len = config.sslcapath.length; i < len; i++) {
102-
results.push(path.resolve(appRootPath, config.sslcapath[i]))
103-
}
104-
return results
105-
})()
98+
config.sslcapath.forEach(function (capath, i, array) {
99+
array[i] = path.resolve(appRootPath, capath)
100+
})
106101

107102
config.sslcertpath = path.join(appRootPath, config.sslcertpath)
108103
config.sslkeypath = path.join(appRootPath, config.sslkeypath)

0 commit comments

Comments
 (0)