From a46ba4a8f56ee8b88688f904cf114c067f08a72e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=BF=E3=81=9F=E3=82=89=E3=81=97=E3=81=A0=E3=82=93?=
 =?UTF-8?q?=E3=81=94?= <MitarashiDango@users.noreply.github.com>
Date: Sat, 29 Jul 2017 21:19:49 +0900
Subject: [PATCH] fix tabs_bar.js (#4436)

---
 app/javascript/mastodon/features/ui/components/tabs_bar.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/features/ui/components/tabs_bar.js b/app/javascript/mastodon/features/ui/components/tabs_bar.js
index 7e6a65cdb1..e4061cdc47 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);
-- 
GitLab