Fix event handler leak in MemberStatusMessageAvatar

A typo led to an event handler leak with the custom status labs feature. A new
handler would leak each time you change rooms, which can add up over the course
of a long-lived session.
This commit is contained in:
J. Ryan Stinnett 2020-01-16 21:52:33 +00:00
parent cad9562f8d
commit 03448313e6

View file

@ -63,7 +63,7 @@ export default class MemberStatusMessageAvatar extends React.Component {
user.on("User._unstable_statusMessage", this._onStatusMessageCommitted);
}
componentWillUmount() {
componentWillUnmount() {
const { user } = this.props.member;
if (!user) {
return;