Skip to content
Snippets Groups Projects
Commit 0c1c037a authored by esikkala's avatar esikkala
Browse files

Fix perspective tab values

parent 934e9845
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,14 @@ class PerspectiveTabs extends React.Component {
}
pathnameToValue = pathname => {
return has(this.props.tabs, pathname) ? this.props.tabs[pathname].value : 0;
const activeID = pathname.split('/').pop();
let value = 0;
this.props.tabs.map(tab => {
if (tab.id == activeID) {
value = tab.value;
}
});
return value;
}
renderIcon = iconString => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment