瀏覽代碼

More correct validation of `allowedFileTypes` to accept null values

Kartik Visweswaran 8 年之前
父節點
當前提交
308a5feded
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      CHANGE.md
  2. 1 1
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 2 - 1
CHANGE.md

@@ -3,7 +3,7 @@ Change Log: `bootstrap-fileinput`
 
 ## version 4.3.9
 
-**Date:** 25-Mar-2017 (_under development_)
+**Date:** 28-Mar-2017 (_under development_)
 
 1. (enh #863): New plugin method `zoom` with parameter `frameId` to allow custom triggering of zoomed preview for each thumbnail frame.
 2. (enh #881): Update Spanish Translations.
@@ -23,6 +23,7 @@ Change Log: `bootstrap-fileinput`
 16. (enh #905): Prevent duplicate files to be dragged and dropped.
 17. (enh #906): Add Swedish Translations.
 18. (enh #909): Update German Translations.
+19. More correct validation of `allowedFileTypes` to accept null values.
 
 ## version 4.3.8
 

+ 1 - 1
js/fileinput.js

@@ -909,7 +909,7 @@
             return fileName ? '<b>' + fileName + ': </b>' + errMsg : errMsg;
         },
         _parseFileType: function (file) {
-            var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes;
+            var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || [];
             for (i = 0; i < types.length; i++) {
                 cat = types[i];
                 isValid = self.fileTypeSettings[cat];

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


Some files were not shown because too many files changed in this diff