]> source.dussan.org Git - gitea.git/commitdiff
Fix an issue with some pages throwing 'not defined' js exceptions (#7450)
authorGary Kim <gary@garykim.dev>
Sat, 13 Jul 2019 08:09:50 +0000 (08:09 +0000)
committerzeripath <art27@cantab.net>
Sat, 13 Jul 2019 08:09:50 +0000 (09:09 +0100)
Fix an issue introduced by 831288cc916d5301beaa0adc1d912d6748a4cdaa

Signed-off-by: Gary Kim <gary@garykim.dev>
public/js/index.js

index b5ead5e6061952badad9999afaccd2ca52c77583..39a283c431f3d227eec0c1139dab4a91d4e854a9 100644 (file)
@@ -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) {