mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 14:12:40 +00:00
Merge pull request #2499 from G-Ambatte/fixMissingMetaTagsCrash-#2498
Fix template.js crash when ogMeta undefined
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const template = async function(name, title='', props = {}){
|
||||
const ogTags = [];
|
||||
Object.entries(props.ogMeta).forEach(([key, value])=>{
|
||||
const ogMeta = props.ogMeta ?? {};
|
||||
Object.entries(ogMeta).forEach(([key, value])=>{
|
||||
if(!value) return;
|
||||
const tag = `<meta property="og:${key}" content="${value}">`;
|
||||
ogTags.push(tag);
|
||||
|
||||
Reference in New Issue
Block a user