From 85ff968d517305ca0e4dc2cb805f2ed8c02dcbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chyeonggkim=E2=80=9D?= <“hyeonggkim@smilegate.com”> Date: Tue, 2 Dec 2025 20:50:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[PWT-98]=20[front]=20Footer=20>=20ZH-TW?= =?UTF-8?q?=20=EA=B2=8C=EC=9E=84=20=EC=9D=B4=EC=9A=A9=20=EB=93=B1=EA=B8=89?= =?UTF-8?q?=20=ED=8C=9D=EC=97=85=20=EB=85=B8=EC=B6=9C=20=EC=98=A4=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layers/components/layouts/Footer.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/layers/components/layouts/Footer.vue b/layers/components/layouts/Footer.vue index 62779aa..1fd33b8 100644 --- a/layers/components/layouts/Footer.vue +++ b/layers/components/layouts/Footer.vue @@ -278,14 +278,22 @@ const useGameRating = computed(() => { ///local/template/common/grades_age const getGameRatingImage = computed((): { type: string, image: string } => { - const contentInfo = footerData.value?.game_rating_info?.rating_type - - // 문자열이 아닌 경우 빈 문자열 반환 - if (!contentInfo || typeof contentInfo !== 'string') { + // 안전하게 rating_type 값 확인 + if ( + !footerData.value?.game_rating_info?.rating_type || + typeof footerData.value.game_rating_info.rating_type !== 'string' + ) { return { type: '', image: '' } } + const contentInfo = footerData.value.game_rating_info.rating_type const ratingType = contentInfo.trim() + + // 빈 문자열인 경우 처리 + if (!ratingType) { + return { type: '', image: '' } + } + const ageTypeMap: Record = { '6': 'Type6', '12': 'Type12', @@ -309,6 +317,14 @@ const getGameRatingImage = computed((): { type: string, image: 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(',') contentInfo.pop()