Browse Source

Fix js error in upload animation

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Jean-Romain Prévost 11 years ago
parent
commit
6c1716cec9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Resources/web/main.js

+ 2 - 1
Resources/web/main.js

@@ -30,11 +30,12 @@ $(function(){
     });
 
     var xhrCache = [];
+    var xhrNb = 0;
     function add (e, data) {
         $('.message').hide();
         var xhr = data.submit();
         $.each(data.files, function(index, file){
-            file._ID = xhrCache.length;
+            file._ID = xhrNb++;
             xhrCache[file._ID] = xhr;
             var hasProgressbar = ('FormData' in window);
             var html = '<li data-file-id="' + file._ID + '">';