FIX: Broken acceptance test

This commit is contained in:
Robin Ward 2016-08-11 15:03:23 -04:00
parent 414388b94f
commit 8f19f60588
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ export function translateResults(results, opts) {
}); });
results.posts = results.posts.map(post => { results.posts = results.posts.map(post => {
post.userPath = Discourse.getURL(`/users/${post.username.toLowerCase()}`); if (post.username) {
post.userPath = Discourse.getURL(`/users/${post.username.toLowerCase()}`);
}
post = Post.create(post); post = Post.create(post);
post.set('topic', topicMap[post.topic_id]); post.set('topic', topicMap[post.topic_id]);
return post; return post;