diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-09 14:30:56 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-01-09 14:30:56 +0000 |
| commit | 2259a94f6440e54bc632009fc1063844ec8252c7 (patch) | |
| tree | 1566bf3bbda00bfc623fa681ed5b5fe2df9e35d1 | |
| parent | 0ee9599508a1148aa3eaf55f4923a8b66029bfd6 (diff) | |
- Fix error when calling remove_row() on non-existing row
git-svn-id: https://svn.roundcube.net/trunk@5747 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/list.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index ff0544f14..70770acb0 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -182,8 +182,12 @@ clear: function(sel) */ remove_row: function(uid, sel_next) { - if (this.rows[uid].obj) - this.rows[uid].obj.style.display = 'none'; + var obj = this.rows[uid] ? this.rows[uid].obj : null; + + if (!obj) + return; + + obj.style.display = 'none'; if (sel_next) this.select_next(); |
