0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 17:34:11 -05:00

Fix #319 (user not-logged in error)

This commit is contained in:
Andrew Patton 2014-07-24 18:23:46 -04:00
parent c4eeb803e1
commit 8ccde45c5f

View file

@ -579,8 +579,11 @@ function initIssue() {
var $attachedList = $("#attached-list"); var $attachedList = $("#attached-list");
var $addButton = $("#attachments-button"); var $addButton = $("#attachments-button");
var fileInput = $("#attachments-input")[0]; var fileInput = document.getElementById("attachments-input");
if (fileInput === null) {
return;
}
fileInput.addEventListener("change", function(event) { fileInput.addEventListener("change", function(event) {
$attachedList.empty(); $attachedList.empty();
$attachedList.append("<b>Attachments:</b> "); $attachedList.append("<b>Attachments:</b> ");