mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
fix tabs_bar.js (#4436)
This commit is contained in:
parent
c71874b84c
commit
a46ba4a8f5
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user