mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 08:39:25 +08:00
Fix error on index page
This commit is contained in:
parent
df385b7df2
commit
c5edf48bf2
@ -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…
x
Reference in New Issue
Block a user