diff options
author | K.SHIRAKASHI <k.shira86@gmail.com> | 2017-10-07 03:37:56 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-06 20:37:56 +0200 |
commit | d5f490b1a2c77a755ae4bd2e73a15a7567eda4c1 (patch) | |
tree | 85919d52f905c2f24cd84123baec16b49f348c38 | |
parent | c75ca0525b5c7fd85a036d71b7b484a2072d701a (diff) |
Fix error on reloading status detail column (#5248)
-rw-r--r-- | app/javascript/mastodon/features/status/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index 83e83540a..abcfee99e 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -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(); } } |