Fix crash when displaying a discussion with no posts. closes #823

This commit is contained in:
Toby Zerner
2016-02-22 22:22:49 +10:30
parent 71d2e71908
commit 05fe4446bf
4 changed files with 13 additions and 7 deletions

View File

@ -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) : [];
}
});