Skip to content

fix(issues): Guard against NaN in supergroup row stats during loading#112294

Merged
scttcper merged 1 commit intomasterfrom
scttcper/fix-supergroup-nan
Apr 6, 2026
Merged

fix(issues): Guard against NaN in supergroup row stats during loading#112294
scttcper merged 1 commit intomasterfrom
scttcper/fix-supergroup-nan

Conversation

@scttcper
Copy link
Copy Markdown
Member

@scttcper scttcper commented Apr 6, 2026

Stats are fetched separately from groups, so when groups are in the
store but stats haven't populated yet, count/userCount are
undefined. parseInt(undefined) returns NaN which propagates through
the sum and renders as "NaN" in the supergroup row.

Guards with || 0 and ?? 0 so partially-loaded groups contribute zero
instead of poisoning the total.

Stats are fetched separately from groups, so when groups are in the
store but stats haven't populated yet, count/userCount are undefined.
parseInt(undefined) returns NaN which propagates through the sum and
renders as "NaN" in the row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@scttcper scttcper requested a review from a team as a code owner April 6, 2026 21:08
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 6, 2026
@scttcper scttcper merged commit 7860532 into master Apr 6, 2026
69 checks passed
@scttcper scttcper deleted the scttcper/fix-supergroup-nan branch April 6, 2026 21:20
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…ding (#112294)

Stats are fetched separately from groups, so when groups are in the
store but stats haven't populated yet, `count`/`userCount` are
undefined. `parseInt(undefined)` returns `NaN` which propagates through
the sum and renders as "NaN" in the supergroup row.

Guards with `|| 0` and `?? 0` so partially-loaded groups contribute zero
instead of poisoning the total.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants