mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Fix crash when displaying a discussion with no posts. closes #823
This commit is contained in:
@@ -98,7 +98,9 @@ Object.assign(Discussion.prototype, {
|
||||
* @public
|
||||
*/
|
||||
postIds() {
|
||||
return this.data.relationships.posts.data.map(link => link.id);
|
||||
const posts = this.data.relationships.posts;
|
||||
|
||||
return posts ? posts.data.map(link => link.id) : [];
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user