mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-16 13:23:52 +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') {
|
||||
instances[instanceId] = {
|
||||
id: instanceId,
|
||||
@@ -555,7 +555,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
const cachedCurrentUser = userStore.cachedUsers.get(
|
||||
userStore.currentUser.id
|
||||
);
|
||||
const lastLocation$ = cachedCurrentUser.$location;
|
||||
const lastLocation$ = cachedCurrentUser?.$location;
|
||||
const playersInInstance = locationStore.lastLocation.playerList;
|
||||
if (lastLocation$.worldId === D.id && playersInInstance.size > 0) {
|
||||
// pull instance json from cache
|
||||
|
||||
Reference in New Issue
Block a user