mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
fix: Cannot read properties of undefined (reading '$location')
This commit is contained in:
@@ -540,7 +540,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const { instanceId, shortName } = D.$location;
|
const { instanceId, shortName } = D?.$location || {};
|
||||||
if (instanceId && typeof instances[instanceId] === 'undefined') {
|
if (instanceId && typeof instances[instanceId] === 'undefined') {
|
||||||
instances[instanceId] = {
|
instances[instanceId] = {
|
||||||
id: instanceId,
|
id: instanceId,
|
||||||
@@ -555,7 +555,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
const cachedCurrentUser = userStore.cachedUsers.get(
|
const cachedCurrentUser = userStore.cachedUsers.get(
|
||||||
userStore.currentUser.id
|
userStore.currentUser.id
|
||||||
);
|
);
|
||||||
const lastLocation$ = cachedCurrentUser.$location;
|
const lastLocation$ = cachedCurrentUser?.$location;
|
||||||
const playersInInstance = locationStore.lastLocation.playerList;
|
const playersInInstance = locationStore.lastLocation.playerList;
|
||||||
if (lastLocation$.worldId === D.id && playersInInstance.size > 0) {
|
if (lastLocation$.worldId === D.id && playersInInstance.size > 0) {
|
||||||
// pull instance json from cache
|
// pull instance json from cache
|
||||||
|
|||||||
Reference in New Issue
Block a user