Fixed tests

This commit is contained in:
Wyatt Johnson
2017-03-23 11:11:57 -06:00
parent 63ef49d595
commit 0e0c3f19aa
+5 -2
View File
@@ -45,8 +45,11 @@ const createComment = ({user, loaders: {Comments}, pubsub}, {body, asset_id, par
}
Comments.countByAssetID.incr(asset_id);
// Publish the newly added comment via the subscription.
pubsub.publish('commentAdded', comment);
if (pubsub) {
// Publish the newly added comment via the subscription.
pubsub.publish('commentAdded', comment);
}
}
return comment;