mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-07 16:12:53 +01:00
check if item is valid
This commit is contained in:
@@ -215,8 +215,12 @@ var fs = require('fs'),
|
||||
mtime: function (next) {
|
||||
async.map(jsPaths, fs.stat, function (err, stats) {
|
||||
async.reduce(stats, 0, function (memo, item, callback) {
|
||||
mtime = +new Date(item.mtime);
|
||||
callback(null, mtime > memo ? mtime : memo);
|
||||
if(item) {
|
||||
mtime = +new Date(item.mtime);
|
||||
callback(null, mtime > memo ? mtime : memo);
|
||||
} else {
|
||||
callback(null, memo);
|
||||
}
|
||||
}, next);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user