mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Fix crash when displaying a discussion with no posts. closes #823
This commit is contained in:
@@ -184,7 +184,7 @@ export default class DiscussionPage extends Page {
|
||||
// the specific post that was routed to.
|
||||
this.stream = new PostStream({discussion, includedPosts});
|
||||
this.stream.on('positionChanged', this.positionChanged.bind(this));
|
||||
this.stream.goToNumber(m.route.param('near') || includedPosts[0].number(), true);
|
||||
this.stream.goToNumber(m.route.param('near') || (includedPosts[0] && includedPosts[0].number()), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user