updated api-call error-handling

This commit is contained in:
2022-02-03 12:26:18 +01:00
parent c5d64fd196
commit 28d31a865c
8 changed files with 210 additions and 394 deletions

View File

@@ -31,8 +31,10 @@ export default {
const getWeaponDamage = async () => {
const resData = await GetWeaponDmg(store, store.state.matchDetails.match_id)
data.equipment_map = resData.equipment_map
data.stats = resData.stats
if (resData !== null) {
data.equipment_map = resData.equipment_map
data.stats = resData.stats
}
}
onMounted(() => {

View File

@@ -30,7 +30,9 @@ export default {
const getWeaponDamage = async () => {
const resData = await GetWeaponDmg(store, store.state.matchDetails.match_id)
data.spray = resData.spray
if (resData !== null) {
data.spray = resData.spray
}
}
onMounted(() => {

View File

@@ -55,6 +55,8 @@ export default {
const parseObject = async () => {
data.rounds = await GetPlayerValue(store, store.state.matchDetails.match_id)
if (data.rounds === null)
data.rounds = {}
for (const round in data.rounds) {
for (const player in data.rounds[round]) {

View File

@@ -122,7 +122,7 @@ export default {
if (store.state.id64 !== '' || store.state.vanityUrl !== '') {
const resData = await GetUser(store, store.state.vanityUrl || store.state.id64)
if (resData) {
if (resData !== null) {
data.searchInput = ''
document.activeElement.blur()