summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/app.js
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 13:36:56 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 13:36:56 +0000
commit5a99bae14a22da8ae155fbfbad0eca853f7cd4e5 (patch)
treebdac630aa82471fb890dedb1b03c06bca4550246 /roundcubemail/program/js/app.js
parent499444fef315e3947f4c2f6cc0590f570929831b (diff)
Only count children's unread if they exist.
git-svn-id: https://svn.roundcube.net/trunk@1702 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
-rw-r--r--roundcubemail/program/js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 3db117f3b..c94db5ca3 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/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');