mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
Fix crash when displaying a discussion with no posts. closes #823
This commit is contained in:
6
js/admin/dist/app.js
vendored
6
js/admin/dist/app.js
vendored
@@ -22244,9 +22244,11 @@ System.register('flarum/models/Discussion', ['flarum/Model', 'flarum/utils/mixin
|
||||
* @public
|
||||
*/
|
||||
postIds: function postIds() {
|
||||
return this.data.relationships.posts.data.map(function (link) {
|
||||
var posts = this.data.relationships.posts;
|
||||
|
||||
return posts ? posts.data.map(function (link) {
|
||||
return link.id;
|
||||
});
|
||||
}) : [];
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user