fix: fix missing key in meta og:title

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-03-19 11:07:55 +01:00
parent fe3ed17610
commit 083da302af

View file

@ -19,7 +19,7 @@ export const OpengraphHead: React.FC = () => {
.filter(([, value]) => value && String(value).trim() !== '')
.map(([key, value]) => <meta property={`og:${key}`} content={value} key={key} />)
if (!('title' in openGraphData)) {
elements.push(<meta property={'og:title'} content={noteTitle} />)
elements.push(<meta property={'og:title'} content={noteTitle} key={'title'} />)
}
return elements
}, [noteTitle, openGraphData])