check if messages is not empty

This commit is contained in:
Fabian Vogelsteller 2015-07-20 15:22:01 +02:00
parent f3b377ebcb
commit 9ce448d9f5
1 changed files with 5 additions and 3 deletions

View File

@ -90,9 +90,11 @@ var getLogsAtStart = function(self, callback){
callback(err);
}
messages.forEach(function (message) {
callback(null, message);
});
if(utils.isArray(messages)) {
messages.forEach(function (message) {
callback(null, message);
});
}
});
}
};