diff options
author | svncommit <devs@roundcube.net> | 2008-08-29 13:36:56 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2008-08-29 13:36:56 +0000 |
commit | 835a0cabaa9cd8e17e02d9c9df0a449eb45677f1 (patch) | |
tree | 681c5c51e6692ca85401d34e955b55e814799a9e | |
parent | e1eb70b617cde5a36008e5ac8d3b787117f226a9 (diff) |
Only count children's unread if they exist.
-rw-r--r-- | program/js/app.js | 6 |
1 files changed, 3 insertions, 3 deletions
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'); |