Small fixes

This commit is contained in:
Natsumi
2025-11-04 02:35:56 +11:00
parent 999f8ffc04
commit bce72d8b6e
4 changed files with 7 additions and 5 deletions

View File

@@ -1046,7 +1046,7 @@ export const useUserStore = defineStore('User', () => {
let friendCount = 0;
const playersInInstance = locationStore.lastLocation.playerList;
const cachedCurrentUser = cachedUsers.get(currentUser.value.id);
const currentLocation = cachedCurrentUser.$location.tag;
const currentLocation = cachedCurrentUser?.$location?.tag;
if (!L.isOffline && currentLocation === L.tag) {
ref = cachedUsers.get(currentUser.value.id);
if (typeof ref !== 'undefined') {

View File

@@ -190,6 +190,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
const url = branches[branch.value].urlLatest;
checkingForVRCXUpdate.value = true;
let response;
let json;
try {
response = await webApiService.execute({
url,
@@ -198,6 +199,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
'VRCX-ID': vrcxId.value
}
});
json = JSON.parse(response.data);
} finally {
checkingForVRCXUpdate.value = false;
}
@@ -211,7 +213,6 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
return;
}
pendingVRCXUpdate.value = false;
const json = JSON.parse(response.data);
if (AppDebug.debugWebRequests) {
console.log(json, response);
}
@@ -262,6 +263,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
const url = branches[branch.value].urlReleases;
checkingForVRCXUpdate.value = true;
let response;
let json;
try {
response = await webApiService.execute({
url,
@@ -270,6 +272,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
'VRCX-ID': vrcxId.value
}
});
json = JSON.parse(response.data);
} finally {
checkingForVRCXUpdate.value = false;
}
@@ -282,7 +285,6 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
});
return;
}
const json = JSON.parse(response.data);
if (AppDebug.debugWebRequests) {
console.log(json, response);
}

View File

@@ -180,7 +180,7 @@
@click.stop="promptLocalAvatarFavoriteGroupDelete(group)"></el-button>
</el-tooltip>
</template>
<div v-if="localAvatarFavorites[group].length" class="x-friend-list" :style="{ marginTop: '10px' }">
<div v-if="localAvatarFavorites[group]?.length" class="x-friend-list" :style="{ marginTop: '10px' }">
<FavoritesAvatarItem
v-for="favorite in localAvatarFavorites[group]"
:key="favorite.id"

View File

@@ -176,7 +176,7 @@
@click.stop="promptLocalWorldFavoriteGroupDelete(group)" />
</el-tooltip>
</template>
<div v-if="localWorldFavorites[group].length" class="x-friend-list" style="margin-top: 10px">
<div v-if="localWorldFavorites[group]?.length" class="x-friend-list" style="margin-top: 10px">
<el-scrollbar height="700px" @end-reached="localWorldFavoritesLoadMore">
<FavoritesWorldLocalItem
v-for="favorite in sliceLocalWorldFavorites(group)"