1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00

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