We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbf3fac commit 4bd7405Copy full SHA for 4bd7405
src/runtime/app/utils/plugins.ts
@@ -49,10 +49,14 @@ export function ogImageCanonicalUrls(nuxtApp: NuxtApp) {
49
50
for (const tag of ctx.tags) {
51
if (tag.tag === 'meta' && (tag.props.property === 'og:image' || ['twitter:image:src', 'twitter:image'].includes(tag.props.name))) {
52
+ if (!tag.props.content) {
53
+ tag.props = {} // equivalent to removing
54
+ continue
55
+ }
56
// looking for:
57
// property og:image
58
// property twitter:image:src
- if (!tag.props.content.startsWith('https')) {
59
+ if (!tag.props.content?.startsWith('https')) {
60
await nuxtApp.runWithContext(() => {
61
tag.props.content = toValue(withSiteUrl(tag.props.content, {
62
withBase: true,
0 commit comments