Skip to content

fix(chatroom): guard against undefined values to avoid crashes#2994

Open
Alok-work23 wants to merge 1 commit intojitsi:masterfrom
Alok-work23:fix/chatroom-null-safety
Open

fix(chatroom): guard against undefined values to avoid crashes#2994
Alok-work23 wants to merge 1 commit intojitsi:masterfrom
Alok-work23:fix/chatroom-null-safety

Conversation

@Alok-work23
Copy link

Description

This PR adds null-safety guards in ChatRoom to prevent potential runtime errors when optional values are undefined.

Related Issue

N/A – This PR addresses a potential runtime issue identified during code review.

Motivation and Context

Both participantPropertyListener and node.children are optional and may be undefined in certain scenarios.
This PR ensures safer handling of these cases and improves overall robustness.

How Has This Been Tested?

N/A

Screenshots or GIF (In case of UI changes): N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jitsi-jenkins
Copy link

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 :(.

@Alok-work23
Copy link
Author

I have signed CLA.

@Alok-work23 Alok-work23 changed the title fix: add null-safety guards in ChatRoom fix(chatroom): guard against undefined values to avoid crashes Mar 19, 2026
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