Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,15 @@ module.exports = class App {

// reset the default service to the primary v4 service if we only have v4 services
if (this._serviceApi === 4) this._defaultService = this.v4.primaryService.name;
// reset the default service to the first v3 service if there is no appserver
else if (this.serviceGroups['3'].length > 0 && !_.find(this.serviceGroups['3'], {service: 'appserver'})) {
// reset the default service to the first v3 service if there is no appserver in v3 or v4
else if (this.serviceGroups['3'].length > 0
&& !_.find(this.serviceGroups['3'], {service: 'appserver'})
&& !_.find(this.serviceGroups['4'], {service: 'appserver'})) {
this._defaultService = this.serviceGroups['3'][0].service;
// reset the default service to the first compose service if there is no appserver
} else if (this.serviceGroups.compose.length > 0 && !_.find(this.serviceGroups.compose, {service: 'appserver'})) {
// reset the default service to the first compose service if there is no appserver in compose or v4
} else if (this.serviceGroups.compose.length > 0
&& !_.find(this.serviceGroups.compose, {service: 'appserver'})
&& !_.find(this.serviceGroups['4'], {service: 'appserver'})) {
this._defaultService = this.serviceGroups.compose[0].service;
}

Expand Down
Loading