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