Missing optional chaining on actor_details and reaction_items in apps/space reactions and votes

Open Beginner friendly
#10,111 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ghazy2001 is already working on this.

Since Oct 29, 2026.

  • #10148 by @ghazy2001 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
backend, frontend

Research direction

Start with apps/space/components/issues/reactions/issue-vote-reactions.tsx and apps/space/store/issue-detail.store.ts, comparing the downvote and reaction handling with the guarded vote handling described in the issue. Check the related reaction and vote tests, if present, and run the relevant checks. Done means missing actor details or reaction items no longer cause a TypeError.

Written by the indexing model from the issue text.

Description

In apps/space/components/issues/reactions/issue-vote-reactions.tsx, the upvote tooltip on line 80 safely uses optional chaining when reading actor_details (allUpVotes.map((r) => r.actor_details?.display_name)), as do lines 51, 52, and 58 (vote.actor_details?.id). However, the downvote tooltip on line 125 accesses r.actor_details.display_name directly without optional chaining:

allDownVotes
  .map((r) => r.actor_details.display_name)
  .slice(0, VOTES_LIMIT)

Similarly, in apps/space/store/issue-detail.store.ts, addIssueVote (line 413) and removeIssueVote (line 428) guard against nullish vote_items and actor_details ((this.details[issueID].vote_items ?? []).filter((v) => v.actor_details?.id !== this.rootStore.user.data?.id)), whereas addIssueReaction (line 324: ...this.details[issueID].reaction_items) and removeIssueReaction (line 346: this.details[issueID].reaction_items.filter((_r) => !(_r.reaction === reactionHex && _r.actor_details.id === this.rootStore.user.data?.id))) right above them do not guard against nullish reaction_items or _r.actor_details.

Adding optional chaining on r.actor_details?.display_name in issue-vote-reactions.tsx and guarding reaction_items ?? [] / _r.actor_details?.id in issue-detail.store.ts prevents a TypeError when actor_details or reaction_items is absent. I can put up a small PR if that's helpful.

Dominant language
TypeScript
Stars
61.9k
Forks
6.3k
Avg merge
1d 18h
Merged PRs (30d)
75

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from makeplane/plane

All issues in makeplane/plane

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.