Allow posts from [deleted] users to be fetched.
This commit is contained in:
parent
5d1930c9dc
commit
f1db5728af
|
@ -73,6 +73,10 @@ function getPosts(postIds) {
|
|||
return {post, acc, user: acc.users[post.author.name]}
|
||||
}
|
||||
|
||||
if(post.author.name === '[deleted]') {
|
||||
return {post, acc, user: {name: '[deleted]'}};
|
||||
}
|
||||
|
||||
return reddit.getUser(post.author.name).fetch().then(curateUser).then(saveProfileDetails).then(user => ({post, acc, user}));
|
||||
}).then(({post, acc, user}) => {
|
||||
post.user = user;
|
||||
|
|
Loading…
Reference in New Issue