Only count children's unread if they exist.

release-0.6
svncommit 16 years ago
parent e1eb70b617
commit 835a0cabaa

@ -3499,9 +3499,9 @@ function rcube_webmail()
text_obj = item.getElementsByTagName('a')[0];
reg = /\s+\([0-9]+\)$/i;
div = item.getElementsByTagName('div')[0];
childcount = 0;
if (div.className.match(/collapsed/))
if ((div = item.getElementsByTagName('div')[0]) &&
div.className.match(/collapsed/))
{
// add children's counters
children = item.getElementsByTagName('li');

Loading…
Cancel
Save