fix(portal-api): prevent crash on cp-watcher when no services
This commit is contained in:
parent
2a34632269
commit
eddc8712b0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user