mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
use includes instead of indexOf
use _.uniq instead of filter&indexOf
This commit is contained in:
@@ -115,7 +115,7 @@ var basePath = path.resolve(__dirname, '../..');
|
||||
function minifyModules(modules, fork, callback) {
|
||||
var moduleDirs = modules.reduce(function (prev, mod) {
|
||||
var dir = path.resolve(path.dirname(mod.destPath));
|
||||
if (prev.indexOf(dir) === -1) {
|
||||
if (!prev.includes(dir)) {
|
||||
prev.push(dir);
|
||||
}
|
||||
return prev;
|
||||
|
||||
Reference in New Issue
Block a user