limit commenter avatars to 4; add try…catch to email sending

This commit is contained in:
Sacha Greif 2016-08-26 10:16:01 +09:00
parent 97d457251c
commit 3d6c7731fe
2 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,7 @@ const PostsCommenters = ({post}) => {
return (
<div className="posts-commenters">
<div className="posts-commenters-avatars">
{post.commentersArray.map(user => <Telescope.components.UsersAvatar key={user._id} user={user}/>)}
{_.take(post.commentersArray, 4).map(user => <Telescope.components.UsersAvatar key={user._id} user={user}/>)}
</div>
<div className="posts-commenters-discuss">
<Link to={Posts.getPageUrl(post)}>

View file

@ -92,9 +92,15 @@ NovaEmail.send = function(to, subject, html, text){
html: html
};
Email.send(email);
try {
Email.send(email);
} catch (error) {
console.log("// error while sending email:")
console.log(error)
}
return email;
};
NovaEmail.buildAndSend = function (to, subject, template, properties) {