fix javaScript error for firstChild is null, on opening mails without subject, or with no accessible subject

This commit is contained in:
Klaus Leithoff 2011-07-18 07:47:22 +00:00
parent ff7a0b3ffd
commit e084ade3b1

View File

@ -63,7 +63,7 @@ function initAll()
}
function updateTitle() {
var _text = document.getElementById('subjectDATA').firstChild.nodeValue;
var _text = document.getElementById('subjectDATA').firstChild ? document.getElementById('subjectDATA').firstChild.nodeValue:'';
if(_text.length>40) {
_text = _text.substring(0,40) + '...';
}