Skip to content

fix(chat/web): add early guard and use stable keys for reactions#17268

Open
nitin-kumar-code wants to merge 1 commit intojitsi:masterfrom
nitin-kumar-code:fix/chatmessage-guard-and-keys
Open

fix(chat/web): add early guard and use stable keys for reactions#17268
nitin-kumar-code wants to merge 1 commit intojitsi:masterfrom
nitin-kumar-code:fix/chatmessage-guard-and-keys

Conversation

@nitin-kumar-code
Copy link
Copy Markdown
Contributor

Summary

Improves ChatMessage robustness and rendering behavior by addressing two issues.

Changes

  • Added an early return guard to avoid rendering when message is undefined or invalid
  • Replaced index-based keys with stable keys for reaction elements

Benefits

  • Prevents potential runtime errors when message data is missing
  • Avoids React rendering issues caused by unstable list keys

Notes

  • No functional changes
  • Minimal and focused improvements

@jitsi-jenkins
Copy link
Copy Markdown

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

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.

2 participants