From fedfc78fb6951ee754705c901cbc5f4385df9317 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 25 Jul 2022 11:59:58 +0200 Subject: [PATCH] fix JS error for selected === undefined --- mail/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index 321d7f9371..949db59a39 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1066,7 +1066,7 @@ app.classes.mail = AppJS.extend( if (data.attachmentsBlock) data.attachmentsBlockTitle = `${data.attachmentsBlock.length} attachments`; mailPreview.set_value({content:data}); - if (selected.length>1) + if (selected && selected.length>1) { // Leave if we're here and there is nothing selected, too many, or no data if (attachmentsBlock)