Skip to content

Commit 75a6fd8

Browse files
authored
Merge pull request #7034 from FlowFuse/include-instance-url-env-var
Include instance url env var
2 parents 4d08436 + 048f559 commit 75a6fd8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

forge/db/controllers/Project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ module.exports = {
318318
let customHostname
319319
if (app.config.features.enabled('customHostnames')) {
320320
const projectURL = URL.parse(project.url)
321-
const hostnameSetting = project.ProjectSettings?.filter(setting => setting.key === KEY_CUSTOM_HOSTNAME) || []
322-
customHostname = hostnameSetting[0]?.value ? `${projectURL.protocol}//${hostnameSetting[0].value}` : undefined
321+
const hostnameSetting = project.ProjectSettings?.find(setting => setting.key === KEY_CUSTOM_HOSTNAME)
322+
customHostname = hostnameSetting?.value ? `${projectURL.protocol}//${hostnameSetting.value}` : undefined
323323
}
324324

325325
const result = []

0 commit comments

Comments
 (0)