fix(portal-api): prevent crash on cp-watcher when no services

This commit is contained in:
Sérgio Ramos 2017-07-12 13:33:10 +01:00 committed by Sérgio Ramos
parent 2a34632269
commit eddc8712b0

View File

@ -73,6 +73,10 @@ module.exports = class ContainerPilotWatcher extends Events {
return next(err); return next(err);
} }
if (!services || !services.length) {
return next();
}
VAsync.forEachParallel({ VAsync.forEachParallel({
inputs: services, inputs: services,
func: getInstances func: getInstances