Skip to content

Commit

Permalink
Merge pull request #56 from markwcollins/support-itemProp-for-custom-…
Browse files Browse the repository at this point in the history
…tags

support item props for custom
  • Loading branch information
meabed authored May 25, 2022
2 parents 5ae1745 + 0d981f4 commit dc0e9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function extractOpenGraph(
// find all the open graph info in the meta tags
$('meta').each((index, meta: TagElement) => {
if (!meta.attribs || (!meta.attribs.property && !meta.attribs.name)) return;
const property = meta.attribs.property || meta.attribs.name;
const property = meta.attribs.property || meta.attribs.name || meta.attribs.itemprop || meta.attribs.itemProp;
const content = meta.attribs.content || meta.attribs.value;
metaFields.forEach((item) => {
if (property.toLowerCase() === item.property.toLowerCase()) {
Expand Down

0 comments on commit dc0e9c9

Please sign in to comment.