From 85312859d2d32d36e0bce4dd89bb3a13eba20520 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 13 Apr 2022 14:15:26 +1200 Subject: [PATCH] Change props.publicUrl fallback behavior --- client/template.js | 2 +- server/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/template.js b/client/template.js index 36eb707bf..d7ef107fa 100644 --- a/client/template.js +++ b/client/template.js @@ -1,5 +1,5 @@ module.exports = async(name, title = '', props = {})=>{ - const HOMEBREWERY_PUBLIC_URL=props.publicUrl ?? ''; + const HOMEBREWERY_PUBLIC_URL=props.publicUrl; return ` diff --git a/server/app.js b/server/app.js index 4113e93be..fe5c12594 100644 --- a/server/app.js +++ b/server/app.js @@ -264,7 +264,7 @@ const templateFn = require('./../client/template.js'); app.use((req, res)=>{ const props = { version : require('./../package.json').version, - publicUrl : config.get('publicUrl'), + publicUrl : config.get('publicUrl') ?? '', url : req.originalUrl, brew : req.brew, brews : req.brews,