From 8ccde45c5fdfe2993b59d13c38c79f661dee189e Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Thu, 24 Jul 2014 18:23:46 -0400 Subject: [PATCH] Fix #319 (user not-logged in error) --- public/js/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 7ffcbd4a..1b4fed7d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -579,8 +579,11 @@ function initIssue() { var $attachedList = $("#attached-list"); var $addButton = $("#attachments-button"); - var fileInput = $("#attachments-input")[0]; - + var fileInput = document.getElementById("attachments-input"); + + if (fileInput === null) { + return; + } fileInput.addEventListener("change", function(event) { $attachedList.empty(); $attachedList.append("Attachments: ");