Handle single-host with empty versions

This commit is contained in:
Joe Fiorini 2015-06-03 12:21:15 -04:00
parent 8868235af2
commit b84bba19f8

View File

@ -31,6 +31,11 @@ function resolveVersions(service, _, results) {
_.every(nonEmptyResults, { 'hostId': nonEmptyResults[0].hostId });
if (allSameHost) {
if (_.any(nonEmptyResults, 'versions.length', 0)) {
return _.pluck(nonEmptyResults, 'versions[0]');
}
var firstTimestamp = nonEmptyResults[0].versions[0].timestamp;
var hostIdsWithDupes =