diff --git a/chattr.html b/chattr.html index a0d59c6..2ca63d3 100644 --- a/chattr.html +++ b/chattr.html @@ -900,13 +900,14 @@

Contact List

var attachmentRoot = "attachments.noindex/"; if (media) { var thumb = media["thumbnail"]; - var thumbPath = attachmentRoot + thumb["path"]; - var thumbWidth = thumb["width"] + "px"; - var thumbHeight = thumb["height"] + "px"; - + if(thumb) { + var thumbPath = attachmentRoot + thumb["path"]; + var thumbWidth = thumb["width"] + "px"; + var thumbHeight = thumb["height"] + "px"; + } /* If attachments are used as the root message of a quote, it won't * have a base path itself, only a thumbnail. */ - if (media["path"]) { + if (thumb && media["path"]) { var mediaId = media["path"].split("/")[1]; var mediaPath = attachmentRoot + media["path"]; var mediaWidth = media["width"]; @@ -928,7 +929,7 @@

Contact List

content += ""; - } else { + } else if(thumb) { content = "";