diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 53f2117fa04..c2d4f31c159 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -117,8 +117,9 @@ openerp_mail_followers = function(session, mail) { follower_read.then(function (follower_record){ if(follower_record.length != 0){ _(follower_record[0].subtype_ids).each(function (subtype_id){ - if(self.$el.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0]){ - self.$el.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true} + var subtype_check = self.$el.find('.oe_msg_subtype_check[id=' + subtype_id + ']') + if(subtype_check.length > 0){ + subtype_check[0].checked=true} }); } })