Browse Source

Fix error on reloading status detail column (#5248)

master
K.SHIRAKASHI 7 years ago
committed by Eugen Rochko
parent
commit
d5f490b1a2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/mastodon/features/status/index.js

+ 2
- 2
app/javascript/mastodon/features/status/index.js View File

@ -242,8 +242,8 @@ export default class Status extends ImmutablePureComponent {
componentDidUpdate () {
const { ancestorsIds } = this.props;
if (ancestorsIds) {
const element = this.node.querySelectorAll('.focusable')[this.props.ancestorsIds.size];
if (ancestorsIds && ancestorsIds.size > 0) {
const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size];
element.scrollIntoView();
}
}

Loading…
Cancel
Save