Skip to content

Commit 0cdcd70

Browse files
committed
Better check
1 parent 6573036 commit 0cdcd70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server_api/controllers/groups.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,8 +1682,10 @@ var getPostsWithAllFromIds = function (postsWithIds, postOrder, done) {
16821682
if (error) {
16831683
done(error);
16841684
} else {
1685-
if (videos.length>0) {
1685+
if (videos && videos.length>0) {
16861686
models.Post.addVideosToAllPosts(posts, videos);
1687+
} else if (!videos) {
1688+
log.error("No videos for getVideosForPosts");
16871689
}
16881690
done(null, posts);
16891691
}

0 commit comments

Comments
 (0)