From 92f5da600f8f5cabe16229da442dfb13a0daaea2 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 7 May 2019 20:02:12 -0300 Subject: [PATCH] [FIX] preview pdf its not working (#14419) --- app/message-attachments/client/messageAttachment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;