From 156462d33e31f8d923d77a014286cb42db7cbe25 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 26 Aug 2015 16:56:06 +0930 Subject: [PATCH] Fix error on index page --- framework/core/js/forum/src/components/DiscussionListItem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/core/js/forum/src/components/DiscussionListItem.js b/framework/core/js/forum/src/components/DiscussionListItem.js index f1b8af6f5..045357b65 100644 --- a/framework/core/js/forum/src/components/DiscussionListItem.js +++ b/framework/core/js/forum/src/components/DiscussionListItem.js @@ -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(); } /**