2.0.1 Beta

This commit is contained in:
Colin McLeod
2016-02-13 22:48:48 -08:00
parent d783a38588
commit 9175fb60af
67 changed files with 1042 additions and 1112 deletions

View File

@@ -9,7 +9,7 @@ import cn from 'classnames';
* @return {boolean} If matches
*/
function isActive(href) {
return encodeURI(href) == (window.location.pathname + window.location.search);
return href == (window.location.pathname + window.location.search);
}
/**
@@ -22,13 +22,12 @@ export default class ActiveLink extends Link {
* @return {React.Component} The active link
*/
render() {
let action = this.handler.bind(this);
let className = this.props.className;
if (isActive(this.props.href)) {
className = cn(className, 'active');
}
return <a {...this.props} className={className} onTouchTap={action}>{this.props.children}</a>;
return <a {...this.props} className={className} onClick={this.handler}>{this.props.children}</a>;
}
}