Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Don't try to collapse zero events with a group #4131

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#12423

When events are redacted they fail to make it into the Grouper because the shouldAddEvent check blocks them from entering. However, the grouper expects that when getTiles() is called that there's events to group and dutifully grabs some context from the array. Because JavaScript is the least helpful language, myArray[-1] returns undefined or null and thus you get cannot read 'sender' of undefined.

Regressed in #4059

Fixes element-hq/element-web#12423

When events are redacted they fail to make it into the Grouper because the `shouldAddEvent` check blocks them from entering. However, the grouper expects that when `getTiles()` is called that there's events to group and dutifully grabs some context from the array. Because JavaScript is the least helpful language, `myArray[-1]` returns `undefined` or `null` and thus you get `cannot read 'sender' of undefined`.

Regressed in #4059
@turt2live turt2live requested a review from a team February 25, 2020 22:40
@turt2live turt2live added the X-Release-Blocker This affects the current release cycle and must be solved for a release to happen label Feb 25, 2020
@turt2live turt2live merged commit 19ee95d into develop Feb 25, 2020
@turt2live turt2live deleted the travis/grouper-empty branch February 25, 2020 22:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Release-Blocker This affects the current release cycle and must be solved for a release to happen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined events in the timeline cause crashes
2 participants