瀏覽代碼

Fix #1152: Correct preview cache splicing

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

+ 3 - 3
js/fileinput.js

@@ -1028,9 +1028,9 @@
                         self.initialPreviewThumbTags = [];
                         return;
                     }
-                    self.previewCache.data.content.splice(index, 1);
-                    self.previewCache.data.config.splice(index, 1);
-                    self.previewCache.data.tags.splice(index, 1);
+                    self.previewCache.data.content = $h.spliceArray(self.previewCache.data.content, index);
+                    self.previewCache.data.config = $h.spliceArray(self.previewCache.data.config, index);
+                    self.previewCache.data.tags = $h.spliceArray(self.previewCache.data.tags, index);
                 },
                 out: function () {
                     var html = '', caption, len = self.previewCache.count(), i;

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