Unverified Commit 4c7ed7bf authored by Chanhee Lee's avatar Chanhee Lee Committed by GitHub

Rename: `OgTypFields` variable to `OgTypeFields` (#46282)

Correct the spelling of the `OgTypFields` variable name to
`OgTypeFields` in `resolve-opengraph.ts`.
parent 16e2fd6d
...@@ -9,7 +9,7 @@ import type { ResolvedTwitterMetadata, Twitter } from '../types/twitter-types' ...@@ -9,7 +9,7 @@ import type { ResolvedTwitterMetadata, Twitter } from '../types/twitter-types'
import { resolveAsArrayOrUndefined } from '../generate/utils' import { resolveAsArrayOrUndefined } from '../generate/utils'
import { isStringOrURL, resolveUrl } from './resolve-url' import { isStringOrURL, resolveUrl } from './resolve-url'
const OgTypFields = { const OgTypeFields = {
article: ['authors', 'tags'], article: ['authors', 'tags'],
song: ['albums', 'musicians'], song: ['albums', 'musicians'],
playlist: ['albums', 'musicians'], playlist: ['albums', 'musicians'],
...@@ -57,19 +57,19 @@ function getFieldsByOgType(ogType: OpenGraphType | undefined) { ...@@ -57,19 +57,19 @@ function getFieldsByOgType(ogType: OpenGraphType | undefined) {
switch (ogType) { switch (ogType) {
case 'article': case 'article':
case 'book': case 'book':
return OgTypFields.article return OgTypeFields.article
case 'music.song': case 'music.song':
case 'music.album': case 'music.album':
return OgTypFields.song return OgTypeFields.song
case 'music.playlist': case 'music.playlist':
return OgTypFields.playlist return OgTypeFields.playlist
case 'music.radio_station': case 'music.radio_station':
return OgTypFields.radio return OgTypeFields.radio
case 'video.movie': case 'video.movie':
case 'video.episode': case 'video.episode':
return OgTypFields.video return OgTypeFields.video
default: default:
return OgTypFields.basic return OgTypeFields.basic
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment