diff --git a/src/stores/instance.js b/src/stores/instance.js index 412f1c3a..b62046b3 100644 --- a/src/stores/instance.js +++ b/src/stores/instance.js @@ -675,7 +675,7 @@ export const useInstanceStore = defineStore('Instance', () => { for (const room of rooms) { ref = cachedInstances.get(room.tag); if (typeof ref !== 'undefined') { - room.ref = ref; + Object.assign(room.ref, ref); } } rooms.sort(function (a, b) { diff --git a/src/stores/user.js b/src/stores/user.js index 8e2e9a3e..9a7fb1f4 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -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; }