summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2019-07-13 08:09:50 +0000
committerzeripath <art27@cantab.net>2019-07-13 09:09:50 +0100
commit50d8d171f01b82f58aa38c16495590c798f3dccb (patch)
treedcbc7384e2c92d03e1d114f961d7e222178532b3 /public/js
parent831288cc916d5301beaa0adc1d912d6748a4cdaa (diff)
downloadgitea-50d8d171f01b82f58aa38c16495590c798f3dccb.tar.gz
gitea-50d8d171f01b82f58aa38c16495590c798f3dccb.zip
Fix an issue with some pages throwing 'not defined' js exceptions (#7450)
Fix an issue introduced by 831288cc916d5301beaa0adc1d912d6748a4cdaa Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index b5ead5e606..39a283c431 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -11,7 +11,9 @@ var csrf;
var suburl;
// Disable Dropzone auto-discover because it's manually initialized
-Dropzone.autoDiscover = false;
+if (typeof(Dropzone) !== "undefined") {
+ Dropzone.autoDiscover = false;
+}
// Polyfill for IE9+ support (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)
if (!Array.from) {