fix: [PWT-98] [front] Footer > ZH-TW 게임 이용 등급 팝업 노출 오류
This commit is contained in:
@@ -278,14 +278,22 @@ const useGameRating = computed<boolean>(() => {
|
|||||||
|
|
||||||
///local/template/common/grades_age
|
///local/template/common/grades_age
|
||||||
const getGameRatingImage = computed((): { type: string, image: string } => {
|
const getGameRatingImage = computed((): { type: string, image: string } => {
|
||||||
const contentInfo = footerData.value?.game_rating_info?.rating_type
|
// 안전하게 rating_type 값 확인
|
||||||
|
if (
|
||||||
// 문자열이 아닌 경우 빈 문자열 반환
|
!footerData.value?.game_rating_info?.rating_type ||
|
||||||
if (!contentInfo || typeof contentInfo !== 'string') {
|
typeof footerData.value.game_rating_info.rating_type !== 'string'
|
||||||
|
) {
|
||||||
return { type: '', image: '' }
|
return { type: '', image: '' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const contentInfo = footerData.value.game_rating_info.rating_type
|
||||||
const ratingType = contentInfo.trim()
|
const ratingType = contentInfo.trim()
|
||||||
|
|
||||||
|
// 빈 문자열인 경우 처리
|
||||||
|
if (!ratingType) {
|
||||||
|
return { type: '', image: '' }
|
||||||
|
}
|
||||||
|
|
||||||
const ageTypeMap: Record<string, string> = {
|
const ageTypeMap: Record<string, string> = {
|
||||||
'6': 'Type6',
|
'6': 'Type6',
|
||||||
'12': 'Type12',
|
'12': 'Type12',
|
||||||
@@ -309,6 +317,14 @@ const getGameRatingImage = computed((): { type: string, image: string } => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const getContentInfoImage = computed((): string[] => {
|
const getContentInfoImage = computed((): string[] => {
|
||||||
|
// 안전하게 content_info 값 확인
|
||||||
|
if (
|
||||||
|
!footerData.value?.game_rating_info?.content_info ||
|
||||||
|
typeof footerData.value.game_rating_info.content_info !== 'string'
|
||||||
|
) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
const contentInfo = footerData.value.game_rating_info.content_info.split(',')
|
const contentInfo = footerData.value.game_rating_info.content_info.split(',')
|
||||||
contentInfo.pop()
|
contentInfo.pop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user