This commit is contained in:
Toby Zerner
2015-05-02 08:45:52 +09:30
parent b829edb07c
commit 74bd697de9
2 changed files with 3 additions and 3 deletions

View File

@ -3,11 +3,11 @@ import icon from 'flarum/helpers/icon'
export default class NavItem extends Component {
view() {
var active = NavItem.active(this.props);
var active = this.constructor.active(this.props);
return m('li'+(active ? '.active' : ''), m('a', {href: this.props.href, config: m.route}, [
icon(this.props.icon+' icon'),
this.props.label, ' ',
m('span.count', this.props.badge)
this.props.badge ? m('span.count', this.props.badge) : ''
]))
}