fix. 피니아 로딩 안된경우 에러 수정
This commit is contained in:
@@ -18,7 +18,7 @@ export default defineNuxtPlugin(async nuxtApp => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const url = `${dataResourcesUrl}/multilingual/${commonTranslations}`
|
const url = `${dataResourcesUrl}/multilingual/${commonTranslations}`
|
||||||
const translations = await commonFetch('GET', url)
|
const translations = await commonFetch('GET', url, { loading: false })
|
||||||
|
|
||||||
if (!translations || typeof translations !== 'object') {
|
if (!translations || typeof translations !== 'object') {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -55,8 +55,13 @@ const buildRequestOptions = (
|
|||||||
let callerDetail = ''
|
let callerDetail = ''
|
||||||
|
|
||||||
if (import.meta.client) {
|
if (import.meta.client) {
|
||||||
const gameDataStore = useGameDataStore()
|
try {
|
||||||
stoveGameId = gameDataStore.gameData?.game_id || ''
|
const gameDataStore = useGameDataStore()
|
||||||
|
stoveGameId = gameDataStore.gameData?.game_id || ''
|
||||||
|
} catch {
|
||||||
|
stoveGameId = ''
|
||||||
|
}
|
||||||
|
|
||||||
callerDetail = useCookie('sgs_da_uuid').value || ''
|
callerDetail = useCookie('sgs_da_uuid').value || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,9 +121,12 @@ export const commonFetch = async (
|
|||||||
options: FetchOptions = {}
|
options: FetchOptions = {}
|
||||||
): Promise<any> => {
|
): Promise<any> => {
|
||||||
let loadingStore = null
|
let loadingStore = null
|
||||||
|
|
||||||
if (import.meta.client) {
|
if (import.meta.client) {
|
||||||
loadingStore = useLoadingStore()
|
try {
|
||||||
|
loadingStore = useLoadingStore()
|
||||||
|
} catch {
|
||||||
|
loadingStore = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
startLoading(loadingStore, options.loading)
|
startLoading(loadingStore, options.loading)
|
||||||
|
|||||||
Reference in New Issue
Block a user