Fixed a typo in the upload test

This commit is contained in:
dosse91 2017-01-09 07:20:56 +01:00
parent f1bf2ce2ae
commit ade23a1c80

View file

@ -58,7 +58,7 @@ function ulTest(done){
var firstTick=true,startT=new Date().getTime(), prevT=new Date().getTime(),prevLoaded=0,speed=0.0;
xhr=new XMLHttpRequest();
xhr.upload.onprogress=function(event){
var instspd=event.loaded<=0?prevLoaded:((event.loaded-prevLoaded)/((new Date().getTime()-prevT)/1000.0));
var instspd=event.loaded<=0?speed:((event.loaded-prevLoaded)/((new Date().getTime()-prevT)/1000.0));
if(isNaN(instspd)||!isFinite(instspd)) return;
if(firstTick){
firstTick=false;