mirror of https://github.com/vector-im/riot-web
Hopefully make comment clearer
parent
531fc3ac54
commit
6cb98d7196
|
@ -164,9 +164,12 @@ module.exports = React.createClass({
|
||||||
// switching rooms. Therefore, if the room ID changes, we
|
// switching rooms. Therefore, if the room ID changes, we
|
||||||
// ignore this. We either need to do this or add code to handle
|
// ignore this. We either need to do this or add code to handle
|
||||||
// saving the scroll position (otherwise we end up saving the
|
// saving the scroll position (otherwise we end up saving the
|
||||||
// scroll position against the wrong room). Given that doing the
|
// scroll position against the wrong room).
|
||||||
// setState here would cause a bunch of unnecessary work, we
|
|
||||||
// just ignore the change.
|
// Given that doing the setState here would cause a bunch of
|
||||||
|
// unnecessary work, we just ignore the change since we know
|
||||||
|
// that if the current room ID has changed from what we thought
|
||||||
|
// it was, it means we're about to be unmounted.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue