Fix instance userCount not updating

This commit is contained in:
Natsumi
2025-09-27 04:21:22 +12:00
parent a0afc2bd6a
commit 7872e066f8
2 changed files with 12 additions and 6 deletions

View File

@@ -193,7 +193,15 @@ export const useUserStore = defineStore('User', () => {
$location: {},
$homeLocationName: '',
users: [],
instance: {},
instance: {
id: '',
tag: '',
$location: {},
friendCount: 0,
users: [],
shortName: '',
ref: {}
},
worlds: [],
avatars: [],
isWorldsLoading: false,
@@ -1118,10 +1126,8 @@ export const useUserStore = defineStore('User', () => {
ref: {}
};
}
const instanceRef = instanceStore.cachedInstances.get(L.tag);
if (typeof instanceRef !== 'undefined') {
D.instance.ref = instanceRef;
}
const instanceRef = instanceStore.cachedInstances.get(L.tag) || {};
Object.assign(D.instance.ref, instanceRef);
D.instance.friendCount = friendCount;
}