From 835a0cabaa9cd8e17e02d9c9df0a449eb45677f1 Mon Sep 17 00:00:00 2001 From: svncommit Date: Fri, 29 Aug 2008 13:36:56 +0000 Subject: Only count children's unread if they exist. --- program/js/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'program/js/app.js') diff --git a/program/js/app.js b/program/js/app.js index 3db117f3b..c94db5ca3 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -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/)) + childcount = 0; + if ((div = item.getElementsByTagName('div')[0]) && + div.className.match(/collapsed/)) { // add children's counters children = item.getElementsByTagName('li'); -- cgit v1.2.3