fix email preview

This commit is contained in:
yuri
2015-05-04 15:34:03 +03:00
parent daa80d7196
commit bc7d4f214f
@@ -31,11 +31,13 @@ Espo.define('Views.Email.Modals.Detail', ['Views.Modals.Detail', 'Views.Email.De
'label': 'Reply',
'style': 'danger'
});
this.listenToOnce(this.model, 'sync', function () {
setTimeout(function () {
this.model.set('isRead', true);
}.bind(this), 50);
}, this);
if (this.model) {
this.listenToOnce(this.model, 'sync', function () {
setTimeout(function () {
this.model.set('isRead', true);
}.bind(this), 50);
}, this);
}
},