diff --git a/app/message-attachments/client/messageAttachment.js b/app/message-attachments/client/messageAttachment.js index 148db49fde2..7caf9b5bd1a 100644 --- a/app/message-attachments/client/messageAttachment.js +++ b/app/message-attachments/client/messageAttachment.js @@ -72,8 +72,8 @@ Template.messageAttachment.helpers({ return this.type === 'file'; }, isPDF() { - if (this.type === 'file' && this.title_link.endsWith('.pdf') && Template.parentData().file) { - this.fileId = Template.parentData().file._id; + if (this.type === 'file' && this.title_link.endsWith('.pdf') && Template.parentData().msg.file) { + this.fileId = Template.parentData().msg.file._id; return true; } return false;