0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 05:02:42 +00:00

Change props.publicUrl fallback behavior

This commit is contained in:
G.Ambatte
2022-04-13 14:15:26 +12:00
parent f8086a098b
commit 85312859d2
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
module.exports = async(name, title = '', props = {})=>{ module.exports = async(name, title = '', props = {})=>{
const HOMEBREWERY_PUBLIC_URL=props.publicUrl ?? ''; const HOMEBREWERY_PUBLIC_URL=props.publicUrl;
return ` return `
<!DOCTYPE html> <!DOCTYPE html>

View File

@@ -264,7 +264,7 @@ const templateFn = require('./../client/template.js');
app.use((req, res)=>{ app.use((req, res)=>{
const props = { const props = {
version : require('./../package.json').version, version : require('./../package.json').version,
publicUrl : config.get('publicUrl'), publicUrl : config.get('publicUrl') ?? '',
url : req.originalUrl, url : req.originalUrl,
brew : req.brew, brew : req.brew,
brews : req.brews, brews : req.brews,