Skip to content

Commit 9fc09e4

Browse files
committed
Small fixes.
1 parent 047b24d commit 9fc09e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

functions/slack/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ function formatSlackMessage (query, response) {
4646
attachments: []
4747
};
4848

49+
console.log(JSON.stringify(entity, null, 2));
50+
4951
if (entity) {
5052
slackMessage.attachments.push({
5153
color: '#3367d6',
5254
title: entity.name + ': ' + entity.description,
5355
title_link: entity.detailedDescription.url,
5456
text: entity.detailedDescription.articleBody,
55-
image_url: entity.image.contentUrl
57+
image_url: entity.image ? entity.image.contentUrl : undefined
5658
});
5759
} else {
5860
slackMessage.attachments.push({

0 commit comments

Comments
 (0)