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);