diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-07-25 01:10:52 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-07-25 01:10:52 -0400 |
commit | 2032080d86af81fe43c10a4506a413e2a848ab4d (patch) | |
tree | 4f87118f46b356b144ef57da56d745a61f05058e | |
parent | c4eeb803e1d77b563a3e6a5c67a78c38858d4e76 (diff) | |
parent | 8ccde45c5fdfe2993b59d13c38c79f661dee189e (diff) | |
download | gitea-2032080d86af81fe43c10a4506a413e2a848ab4d.tar.gz gitea-2032080d86af81fe43c10a4506a413e2a848ab4d.zip |
Merge pull request #320 from acusti/patch-2
Fix #319 (user not-logged in error)
-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> "); |