mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Fix error on index page
This commit is contained in:
parent
0979139d67
commit
156462d33e
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user