]> cat aescling's git repositories - mastodon.git/commitdiff
workaround for scrollIntoView bug ???
authorOndřej Hruška <ondra@ondrovo.com>
Wed, 11 Oct 2017 19:49:22 +0000 (21:49 +0200)
committerOndřej Hruška <ondra@ondrovo.com>
Wed, 11 Oct 2017 19:49:22 +0000 (21:49 +0200)
app/javascript/mastodon/features/status/index.js

index 656226fcac5ed23233c37d09c876595eb35796bf..c40630a0a1e1217b70110a77d9ab4754fd6e45ed 100644 (file)
@@ -252,8 +252,10 @@ export default class Status extends ImmutablePureComponent {
     if (status && ancestorsIds && ancestorsIds.size > 0) {
       const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1];
 
-      element.scrollIntoView(true);
-      this._scrolledIntoView = true;
+      if (element) {
+        element.scrollIntoView(true);
+        this._scrolledIntoView = true;
+      }
     }
   }
 
This page took 0.052641 seconds and 3 git commands to generate.