aboutsummaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/app.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 7ffcbd4a..62482965 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -536,7 +536,7 @@ function initIssue() {
var over = function() {
var $this = $(this);
- if ($this.text().match(/\.(png|jpg|jpeg|gif)$/i) == false) {
+ if ((/\.(png|jpg|jpeg|gif)$/i).test($this.text()) == false) {
return;
}
@@ -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> ");