浏览代码

Fix #253: Fix initial preview delete cache initialization

Kartik Visweswaran 10 年之前
父节点
当前提交
35b5897f3f
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 1 0
      CHANGE.md
  2. 3 3
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 1 - 0
CHANGE.md

@@ -15,6 +15,7 @@ version 4.1.9
 11. (enh #250): Change default slug routine to allow umlauts in filenames.
 12. (enh #251): Add Italian localizations.
 13. (enh #252): Enhance async batch completion.
+14. (bug #253): Fix initial preview delete cache initialization.
 
 version 4.1.8
 =============

+ 3 - 3
js/fileinput.js

@@ -63,7 +63,7 @@
                 var ind = 'init_' + i, data = previewCache.data[id],
                     previewId = data.initId + '-' + ind, out;
                 isDisabled = isDisabled === undefined ? true : isDisabled;
-                if (data.content[i] === undefined) {
+                if (data.content[i] === null) {
                     return '';
                 }
                 out = data.template
@@ -127,8 +127,8 @@
                     previewCache.data[id].config = [];
                     return;
                 }
-                previewCache.data[id].content[index] = undefined;
-                previewCache.data[id].config[index] = undefined;
+                previewCache.data[id].content[index] = null;
+                previewCache.data[id].config[index] = null;
             },
             out: function (id) {
                 var html = '', data = previewCache.data[id], caption, len = previewCache.count(id);

文件差异内容过多而无法显示
+ 0 - 0
js/fileinput.min.js


部分文件因为文件数量过多而无法显示