Merge branch 'MDL-45124-master' of git://github.com/andrewnicols/moodle
authorSam Hemelryk <sam@moodle.com>
Wed, 23 Apr 2014 23:03:15 +0000 (11:03 +1200)
committerSam Hemelryk <sam@moodle.com>
Wed, 23 Apr 2014 23:03:15 +0000 (11:03 +1200)
course/dndupload.js

index 5207f10..df6c35c 100644 (file)
@@ -232,8 +232,12 @@ M.course_dndupload = {
     types_includes: function(e, type) {
         var i;
         var types = e._event.dataTransfer.types;
+        type = type.toLowerCase();
         for (i=0; i<types.length; i++) {
-            if (types[i] == type) {
+            if (!types.hasOwnProperty(i)) {
+                continue;
+            }
+            if (types[i].toLowerCase() === type) {
                 return true;
             }
         }