From 0e27bb843c71735b42e49504661f70a116bc5888 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 3 Mar 2023 11:05:34 +0100 Subject: [PATCH] Make sure the mail preview grid is there before using it --- mail/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 63c6ccc1b3..1800aba6b3 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1105,7 +1105,7 @@ app.classes.mail = AppJS.extend( data.attachmentsBlockTitle = _data.length > 1 ? `+${_data.length-1}` : ''; // Update client cache to avoid resolving winmail.dat attachment again egw.dataStoreUID(data.uid, data); - if (!egwIsMobile()) mailPreview.set_value({content:data}); + if (!egwIsMobile() && mailPreview) mailPreview.set_value({content:data}); } else { @@ -1187,7 +1187,7 @@ app.classes.mail = AppJS.extend( sel_options.attachmentsBlock.actions = actions; } - if (!egwIsMobile()) mailPreview.set_value({content:data, sel_options:sel_options}); + if (!egwIsMobile() && mailPreview) mailPreview.set_value({content:data, sel_options:sel_options}); if (selected && selected.length>1) {