Fix error on index page

This commit is contained in:
Toby Zerner 2015-08-26 16:56:06 +09:30
parent 0979139d67
commit 156462d33e

View File

@ -130,7 +130,9 @@ export default class DiscussionListItem extends Component {
* @return {Boolean}
*/
active() {
return m.route.param('id').split('-')[0] === this.props.discussion.id();
const idParam = m.route.param('id');
return idParam && idParam.split('-')[0] === this.props.discussion.id();
}
/**