fix tabs_bar.js (#4436)

pull/111/head
みたらしだんご 2017-07-29 21:19:49 +09:00 committed by Eugen Rochko
parent c71874b84c
commit a46ba4a8f5
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ export default class TabsBar extends React.Component {
const nextTab = tabs.find(tab => tab.contains(e.target)); const nextTab = tabs.find(tab => tab.contains(e.target));
const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)]; const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)];
currentTab.classList.remove('active'); if (currentTab) {
currentTab.classList.remove('active');
}
const listener = debounce(() => { const listener = debounce(() => {
nextTab.removeEventListener('transitionend', listener); nextTab.removeEventListener('transitionend', listener);