mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Add null check for error callback on missions update
This commit is contained in:
parent
0d6e66e131
commit
5880b10b24
@ -27,7 +27,9 @@ Missions.prototype.updateMissions = function (cb) {
|
||||
var self = this
|
||||
fs.readdir(this.missionsPath(), function (err, files) {
|
||||
if (err) {
|
||||
cb(err)
|
||||
if (cb) {
|
||||
cb(err)
|
||||
}
|
||||
} else {
|
||||
async.map(files, function (filename, cb) {
|
||||
fs.stat(self.missionPath(filename), function (err, stat) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user