room sublist seems to get rendered w/o _scroll element
when loading the page from a community url
This commit is contained in:
@@ -38,6 +38,9 @@ class RoomSizer extends Sizer {
|
|||||||
class RoomDistributor extends FixedDistributor {
|
class RoomDistributor extends FixedDistributor {
|
||||||
resize(itemSize) {
|
resize(itemSize) {
|
||||||
const scrollItem = this.item.querySelector(".mx_RoomSubList_scroll");
|
const scrollItem = this.item.querySelector(".mx_RoomSubList_scroll");
|
||||||
|
if (!scrollItem) {
|
||||||
|
return; //FIXME: happens when starting the page on a community url, taking the safe way out for now
|
||||||
|
}
|
||||||
const fixedHeight = this.item.offsetHeight - scrollItem.offsetHeight;
|
const fixedHeight = this.item.offsetHeight - scrollItem.offsetHeight;
|
||||||
if (itemSize > (fixedHeight + scrollItem.scrollHeight)) {
|
if (itemSize > (fixedHeight + scrollItem.scrollHeight)) {
|
||||||
super.resize("resized-all");
|
super.resize("resized-all");
|
||||||
|
|||||||
Reference in New Issue
Block a user