xhr-shaper
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "xhr-shaper", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Shapes your XHR requests to a max emulated bandwidth and latency, randomizes frequency of progress events", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,3 +26,3 @@ // This will shim the XHR object in your window and add some custom functionnality on top in the Shaper object | ||
loadEndEvent = event; | ||
if (_onloadend && done) { | ||
if (done && _onloadend) { | ||
_onloadend(event); | ||
@@ -34,3 +34,3 @@ } | ||
loadEvent = event; | ||
if (_onload && done) { | ||
if (done && _onload) { | ||
_onload(event); | ||
@@ -95,10 +95,9 @@ } | ||
}, Math.max(delay1, delay2)); | ||
break; | ||
} else { | ||
console.log('not delaying'); | ||
done = true; | ||
triggerStateChange(event); | ||
} | ||
triggerStateChange(event); | ||
break; | ||
} | ||
}; | ||
@@ -105,0 +104,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16828
277