Skip to content

fix(react): guard against null childElement in MessageAggregator - #1479

Open
Suraj704-glitch wants to merge 1 commit into
RocketChat:developfrom
Suraj704-glitch:fix/message-aggregator-jump-null-check
Open

Suraj704-glitch wants to merge 1 commit into
RocketChat:developfrom
Suraj704-glitch:fix/message-aggregator-jump-null-check

Conversation

@Suraj704-glitch

@Suraj704-glitch Suraj704-glitch commented Nov 30, 2026 •

Copy link
Copy Markdown

Guard against null childElement in MessageAggregator setJumpToMessage

Acceptance Criteria fulfillment

  • Guard childElement?.closest('.ec-message') with optional chaining in both the thread and main message list jump branches inside MessageAggregator.js
  • Prevent uncaught TypeError when jumping to an unrendered, older, or deleted message
  • Verify jump-to-message behavior locally in Storybook with zero console errors

Fixes #1478

Video/Screenshots

screen-recording-2026-11-30-220008_yl3KTLAq.mp4

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1479 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ug(react): guard against null childElement in MessageAggregator setJumpToMessage

1 participant