Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 27, 2024
1 parent 5dbc313 commit c0c943a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/domainService.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,12 @@ async function generateAndReplaceMainApplicationHaproxyConfig(isGmode = false, t
const updatingConfig = JSON.parse(JSON.stringify(recentlyConfiguredApps));
// merge recentlyConfiguredApps with currently configuredApps
for (const app of configuredApps) {
let appExists = recentlyConfiguredApps.find((a) => a.appName === app.appName);
const appExists = updatingConfig.find((a) => a.appName === app.appName);
if (!appExists) {
updatingConfig.push(app);
} else {
appExists = app; // this is also updating element in updatingConfig
// replace this element with new
updatingConfig.splice(updatingConfig.indexOf(appExists), 1, app);
}
}
configuredApps = updatingConfig;
Expand Down

0 comments on commit c0c943a

Please sign in to comment.