Skip to content

Commit

Permalink
fix(schema.org): more intuitive overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Nov 1, 2023
1 parent 6b2a6ff commit bc855c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/schema-org/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Partial<Met
// use template params
else if (tag.tag === 'templateParams' && tag.props.schemaOrg) {
resolvedMeta = {
...resolvedMeta,
// @ts-expect-error untyped
...tag.props.schemaOrg,
...resolvedMeta,
}
delete tag.props.schemaOrg
}
Expand All @@ -83,7 +83,7 @@ export function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Partial<Met
tag.innerHTML = processTemplateParams(
JSON.stringify({
'@context': 'https://schema.org',
'@graph': graph.resolveGraph({ ...config, ...resolvedMeta, ...(await meta?.() || {}) }),
'@graph': graph.resolveGraph({ ...(await meta?.() || {}), ...config, ...resolvedMeta, }),
}, null, minify ? 0 : 2),
head._templateParams!,
head._separator!,
Expand Down

0 comments on commit bc855c0

Please sign in to comment.