forked from github/plane
fix: Application Error on issues list page (#1064)
* fix: Application Error on issues list page * fix: can't read property of undefined at renderTick
This commit is contained in:
parent
4ce5a450d9
commit
6da4247400
@ -80,7 +80,7 @@ export const AnalyticsGraph: React.FC<Props> = ({
|
||||
params.x_axis === "assignees__email"
|
||||
? (datum) => {
|
||||
const avatar = analytics.extras.assignee_details?.find(
|
||||
(a) => a.assignees__email === datum.value
|
||||
(a) => a?.assignees__email === datum?.value
|
||||
)?.assignees__avatar;
|
||||
|
||||
if (avatar && avatar !== "")
|
||||
|
@ -54,22 +54,22 @@ export const ScopeAndDemand: React.FC<Props> = ({ fullScreen = true }) => {
|
||||
<AnalyticsDemand defaultAnalytics={defaultAnalytics} />
|
||||
<AnalyticsScope defaultAnalytics={defaultAnalytics} />
|
||||
<AnalyticsLeaderboard
|
||||
users={defaultAnalytics.most_issue_created_user.map((user) => ({
|
||||
avatar: user.created_by__avatar,
|
||||
email: user.created_by__email,
|
||||
firstName: user.created_by__first_name,
|
||||
lastName: user.created_by__last_name,
|
||||
count: user.count,
|
||||
users={defaultAnalytics.most_issue_created_user?.map((user) => ({
|
||||
avatar: user?.created_by__avatar,
|
||||
email: user?.created_by__email,
|
||||
firstName: user?.created_by__first_name,
|
||||
lastName: user?.created_by__last_name,
|
||||
count: user?.count,
|
||||
}))}
|
||||
title="Most issues created"
|
||||
/>
|
||||
<AnalyticsLeaderboard
|
||||
users={defaultAnalytics.most_issue_closed_user.map((user) => ({
|
||||
avatar: user.assignees__avatar,
|
||||
email: user.assignees__email,
|
||||
firstName: user.assignees__first_name,
|
||||
lastName: user.assignees__last_name,
|
||||
count: user.count,
|
||||
users={defaultAnalytics.most_issue_closed_user?.map((user) => ({
|
||||
avatar: user?.assignees__avatar,
|
||||
email: user?.assignees__email,
|
||||
firstName: user?.assignees__first_name,
|
||||
lastName: user?.assignees__last_name,
|
||||
count: user?.count,
|
||||
}))}
|
||||
title="Most issues closed"
|
||||
/>
|
||||
|
@ -41,7 +41,7 @@ export const AnalyticsScope: React.FC<Props> = ({ defaultAnalytics }) => (
|
||||
axisBottom={{
|
||||
renderTick: (datum) => {
|
||||
const avatar =
|
||||
defaultAnalytics.pending_issue_user[datum.tickIndex].assignees__avatar ?? "";
|
||||
defaultAnalytics.pending_issue_user[datum.tickIndex]?.assignees__avatar ?? "";
|
||||
|
||||
if (avatar && avatar !== "")
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user