Skip to content
Snippets Groups Projects
Commit ade23a1c authored by dosse91's avatar dosse91
Browse files

Fixed a typo in the upload test

parent f1bf2ce2
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ function ulTest(done){ ...@@ -58,7 +58,7 @@ function ulTest(done){
var firstTick=true,startT=new Date().getTime(), prevT=new Date().getTime(),prevLoaded=0,speed=0.0; var firstTick=true,startT=new Date().getTime(), prevT=new Date().getTime(),prevLoaded=0,speed=0.0;
xhr=new XMLHttpRequest(); xhr=new XMLHttpRequest();
xhr.upload.onprogress=function(event){ 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(isNaN(instspd)||!isFinite(instspd)) return;
if(firstTick){ if(firstTick){
firstTick=false; firstTick=false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment