Skip to content

Commit

Permalink
add filter
Browse files Browse the repository at this point in the history
  • Loading branch information
timoweiss committed Feb 19, 2016
1 parent 0bf14db commit e0d59d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ fns.findLatestMessagesByDistinctConversation = (userId, query) => {
});
})
.then(promises => Promise.all(promises))
.then(messages => messages.filter(message => message.length))
.then(results => {
let merged = [].concat.apply([], results);
merged.sort((a, b) => {
Expand Down

0 comments on commit e0d59d9

Please sign in to comment.