[PR #5392] Fix undefined points error in contributor points #12967

Closed
opened 2026-04-10 21:43:38 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/5392

State: closed
Merged: Yes


Failing CI job: https://github.com/actualbudget/actual/actions/runs/16526264065/job/46740250320

Fix: Prevent TypeError: Cannot read properties of undefined (reading 'points') in count-points.mjs

This error occurred when non-organization members performed actions (like removing "needs triage" labels or closing issues). The script attempted to access userStats.points for these users, but stats.get(login) returned undefined for non-members, causing the crash.

This PR adds null checks (if (userStats)) before attempting to update user statistics, ensuring that points are only processed for recognized organization members and gracefully ignoring actions by non-members without error.


Open in WebOpen in Cursor

Learn more about Background Agents

**Original Pull Request:** https://github.com/actualbudget/actual/pull/5392 **State:** closed **Merged:** Yes --- Failing CI job: https://github.com/actualbudget/actual/actions/runs/16526264065/job/46740250320 Fix: Prevent `TypeError: Cannot read properties of undefined (reading 'points')` in `count-points.mjs` This error occurred when non-organization members performed actions (like removing "needs triage" labels or closing issues). The script attempted to access `userStats.points` for these users, but `stats.get(login)` returned `undefined` for non-members, causing the crash. This PR adds null checks (`if (userStats)`) before attempting to update user statistics, ensuring that points are only processed for recognized organization members and gracefully ignoring actions by non-members without error. --- [Open in Web](https://cursor.com/agents?id=bc-0fa87c24-91ba-420b-9bdf-faeaa2f7c6de) • [Open in Cursor](https://cursor.com/background-agent?bcId=bc-0fa87c24-91ba-420b-9bdf-faeaa2f7c6de) Learn more about [Background Agents](https://docs.cursor.com/background-agent/web-and-mobile)
GiteaMirror added the pull-request label 2026-04-10 21:43:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#12967