Skip to content

Commit af330c2

Browse files
committed
Improved error handling in function showAttachImage
1 parent 99e3800 commit af330c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

imcger/imgupload/styles/all/template/event/overall_footer_body_after.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@
327327
*/
328328
imcger.imgUpload.showAttachImage = function() {
329329
// Attachments that insert in the message
330-
const notDisplayedAttachments = {{ IUL_NOT_DISPLAYED_ATTACHMENTS }},
330+
const notDisplayedAttachments = {{ IUL_NOT_DISPLAYED_ATTACHMENTS ?? '[]' }},
331331
// If true don't show the attachment box
332-
notDisplayAttachmentBox = {{ IUL_NOT_DISPLAY_ATTACHMENTBOX }};
332+
notDisplayAttachmentBox = {{ IUL_NOT_DISPLAY_ATTACHMENTBOX ?? 0 }};
333333

334334
// Return when no attachments present
335-
if (typeof notDisplayAttachmentBox == 'undefined' || notDisplayAttachmentBox && !notDisplayedAttachments.length) {
335+
if (!notDisplayedAttachments.length) {
336336
return;
337337
}
338338

0 commit comments

Comments
 (0)