Null-guard roomId before sending a dispatch to update scroll state

Otherwise we pointlessly assign the null key to something
pull/21833/head
Luke Barnard 2017-06-08 15:45:50 +01:00
parent 59e649f326
commit 1792fa45f4
1 changed files with 4 additions and 0 deletions

View File

@ -590,6 +590,10 @@ module.exports = React.createClass({
},
_updateScrollMap(roomId) {
// No point updating scroll state if the room ID hasn't been resolved yet
if (!roomId) {
return;
}
dis.dispatch({
action: 'update_scroll_state',
room_id: roomId,