about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorみたらしだんご <MitarashiDango@users.noreply.github.com>2017-07-29 21:19:49 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-29 14:19:49 +0200
commita46ba4a8f56ee8b88688f904cf114c067f08a72e (patch)
treecf97b73ac312d0e678bc2e7865ed4371ae687286 /app/javascript
parentc71874b84c1616f2a55547e1aa7cf81fc5c30636 (diff)
fix tabs_bar.js (#4436)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/ui/components/tabs_bar.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/tabs_bar.js b/app/javascript/mastodon/features/ui/components/tabs_bar.js
index 7e6a65cdb..e4061cdc4 100644
--- a/app/javascript/mastodon/features/ui/components/tabs_bar.js
+++ b/app/javascript/mastodon/features/ui/components/tabs_bar.js
@@ -48,7 +48,9 @@ export default class TabsBar extends React.Component {
       const nextTab = tabs.find(tab => tab.contains(e.target));
       const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)];
 
-      currentTab.classList.remove('active');
+      if (currentTab) {
+        currentTab.classList.remove('active');
+      }
 
       const listener = debounce(() => {
         nextTab.removeEventListener('transitionend', listener);