|
|
@@ -86,11 +86,13 @@ module.exports = function(crowi, app) {
|
|
|
const path = page.path;
|
|
|
const channels = slackNotificationForm.slackChannels;
|
|
|
|
|
|
- page.updateSlackChannel(channels).then(function() {}).catch(function() {});
|
|
|
+ if (channels) {
|
|
|
+ page.updateSlackChannel(channels).then(function() {}).catch(function() {});
|
|
|
|
|
|
- channels.split(',').map(function(chan) {
|
|
|
- crowi.slack.postComment(createdComment, user, chan, path);
|
|
|
- });
|
|
|
+ channels.split(',').map(function(chan) {
|
|
|
+ crowi.slack.postComment(createdComment, user, chan, path);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
catch (err) {
|
|
|
logger.error('error occured in sending slack notification: ', err);
|