summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 50078cfd8..caef29271 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1272,10 +1272,12 @@ function rcube_webmail()
this.permanently_remove_messages = function()
{
// exit if no mailbox specified or if selection is empty
- var selection = this.message_list.get_selection();
- if (!(selection.length || this.env.uid))
- return;
-
+ if (!this.env.uid)
+ {
+ if (!this.message_list || !this.message_list.get_selection().length)
+ return;
+ }
+
var a_uids = new Array();
if (this.env.uid)