Fix transcript to users without email

pull/4568/head
Diego Sampaio 9 years ago
parent 80bb9d685f
commit 725fa52ff1
  1. 5
      packages/rocketchat-livechat/app/client/lib/commands.js

@ -13,7 +13,8 @@ this.Commands = {
promptTranscript: function() {
if (Livechat.transcript) {
let email = Meteor.user().emails[0].address || '';
const user = Meteor.user();
let email = user.emails && user.emails.length > 0 ? user.emails[0].address : '';
swal({
title: t('Chat_ended'),
@ -60,4 +61,4 @@ this.Commands = {
});
}
}
};
};

Loading…
Cancel
Save