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:46 +00:00
parent c997f1f1f6
commit 32a20c8eaa

View File

@ -56,7 +56,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) + '...';
}