mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
fix: Fix TypeError on pages with empty feeds (#35504)
This commit is contained in:
parent
c871c7398e
commit
6fc77a545b
|
@ -41,9 +41,11 @@ export default class StatusList extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.columnHeaderHeight = parseFloat(
|
||||
getComputedStyle(this.node.node).getPropertyValue('--column-header-height')
|
||||
) || 0;
|
||||
this.columnHeaderHeight = this.node?.node
|
||||
? parseFloat(
|
||||
getComputedStyle(this.node.node).getPropertyValue('--column-header-height')
|
||||
) || 0
|
||||
: 0;
|
||||
}
|
||||
|
||||
getFeaturedStatusCount = () => {
|
||||
|
@ -69,8 +71,8 @@ export default class StatusList extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
_selectChild = (id, index, direction) => {
|
||||
const listContainer = this.node.node;
|
||||
let listItem = listContainer.querySelector(
|
||||
const listContainer = this.node?.node;
|
||||
let listItem = listContainer?.querySelector(
|
||||
// :nth-child uses 1-based indexing
|
||||
`.item-list > :nth-child(${index + 1 + direction})`
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user