mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Fix chart crash when current user wasn't in the instance
This commit is contained in:
@@ -311,11 +311,14 @@
|
|||||||
const sameLocation = arr[0]?.location === this.activityData[params?.dataIndex]?.location;
|
const sameLocation = arr[0]?.location === this.activityData[params?.dataIndex]?.location;
|
||||||
const sameJoinTime = arr
|
const sameJoinTime = arr
|
||||||
.find((item) => item.user_id === this.API.currentUser.id)
|
.find((item) => item.user_id === this.API.currentUser.id)
|
||||||
.joinTime.isSame(this.activityData[params?.dataIndex].joinTime);
|
?.joinTime.isSame(this.activityData[params?.dataIndex].joinTime);
|
||||||
return sameLocation && sameJoinTime;
|
return sameLocation && sameJoinTime;
|
||||||
});
|
});
|
||||||
if (detailDataIdx === -1) {
|
if (detailDataIdx === -1) {
|
||||||
console.error('handleClickYAxisLabel failed', params);
|
console.error(
|
||||||
|
"handleClickYAxisLabel failed, likely current user wasn't in this instance",
|
||||||
|
params
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.activityDetailChartRef[detailDataIdx].$el.scrollIntoView({
|
this.$refs.activityDetailChartRef[detailDataIdx].$el.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
|
|||||||
Reference in New Issue
Block a user