diff options
author | Andrew Patton <andrew@acusti.ca> | 2014-07-24 18:23:46 -0400 |
---|---|---|
committer | Andrew Patton <andrew@acusti.ca> | 2014-07-24 18:23:46 -0400 |
commit | 8ccde45c5fdfe2993b59d13c38c79f661dee189e (patch) | |
tree | 4f87118f46b356b144ef57da56d745a61f05058e /public/js | |
parent | c4eeb803e1d77b563a3e6a5c67a78c38858d4e76 (diff) | |
download | gitea-8ccde45c5fdfe2993b59d13c38c79f661dee189e.tar.gz gitea-8ccde45c5fdfe2993b59d13c38c79f661dee189e.zip |
Fix #319 (user not-logged in error)
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/app.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/public/js/app.js b/public/js/app.js index 7ffcbd4a3e..1b4fed7def 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("<b>Attachments:</b> "); |