Explorar o código

Fixed a typo in download test

dosse91 %!s(int64=9) %!d(string=hai) anos
pai
achega
152a69008b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      speedtest_worker.js

+ 1 - 1
speedtest_worker.js

@@ -28,7 +28,7 @@ function dlTest(done){
     var firstTick=true,startT=new Date().getTime(), prevT=new Date().getTime(),prevLoaded=0,speed=0.0;
     xhr=new XMLHttpRequest();
     xhr.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){
             speed=instspd;