element-hq / element-hq/element-web

`Cannot read properties of null (reading 'name')` in `RoomPreviewBar.tsx`

Open
#24,509 0 comments 0 reactions 0 assignees View on GitHub
A-Room-View O-Uncommon S-Minor T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

See rageshake https://github.com/matrix-org/element-web-rageshakes/issues/20064

It is possible to get to line 491:

```
title = _t("Do you want to chat with %(user)s?", { user: inviteMember.name });
```

when `inviteMember` is null.

We should prevent this.

### Outcome

.

### Operating system

_No response_

### Browser information

_No response_

### URL for webapp

_No response_

### Application version

1.11.22

### Homeserver

_No response_

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Research direction

Start in RoomPreviewBar.tsx at line 491, where the issue reports that inviteMember can be null while its name is read. Use the linked rageshake reproduction to trace that state and verify that reaching this path no longer causes the null-property error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.