From 85fece2c4dbc6ef36ccd08d32e35501a1d131f81 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 27 Sep 2013 14:56:25 +0200 Subject: rcube_list_widget.rows is not an array - fixed checking if it's empty (#1489359) --- program/js/app.js | 10 +++++----- program/js/list.js | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 337a12156..2d8be37d7 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2832,10 +2832,10 @@ function rcube_webmail() { var len = a_uids.length, i, uid, all_deleted = true, - rows = this.message_list ? this.message_list.rows : []; + rows = this.message_list ? this.message_list.rows : {}; if (len == 1) { - if (!rows.length || (rows[a_uids[0]] && !rows[a_uids[0]].deleted)) + if (!this.message_list || (rows[a_uids[0]] && !rows[a_uids[0]].deleted)) this.flag_as_deleted(a_uids); else this.flag_as_undeleted(a_uids); @@ -2876,7 +2876,7 @@ function rcube_webmail() var r_uids = [], post_data = this.selection_post_data({_uid: this.uids_to_list(a_uids), _flag: 'delete'}), lock = this.display_message(this.get_label('markingmessage'), 'loading'), - rows = this.message_list ? this.message_list.rows : [], + rows = this.message_list ? this.message_list.rows : {}, count = 0; for (var i=0, len=a_uids.length; i