mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-23 00:32:11 +00:00
fix: use modern in syntax instead of Object.prototype.hasOwnProperty
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
ada2dce9c2
commit
5a7a37a241
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export const OpengraphHead: React.FC = () => {
|
|||
const elements = Object.entries(openGraphData)
|
||||
.filter(([, value]) => value && String(value).trim() !== '')
|
||||
.map(([key, value]) => <meta property={`og:${key}`} content={value} key={key} />)
|
||||
if (!Object.prototype.hasOwnProperty.call(openGraphData, 'title')) {
|
||||
if (!('title' in openGraphData)) {
|
||||
elements.push(<meta property={'og:title'} content={noteTitle} />)
|
||||
}
|
||||
return elements
|
||||
|
|
Loading…
Reference in a new issue