mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 22:33:50 +00:00
Fix crash when cancelling more than one HTTP request
Thanks @saqimtiaz
This commit is contained in:
parent
53715bd3fd
commit
cc7b857d71
@ -65,9 +65,10 @@ HttpClient.prototype.initiateHttpRequest = function(options) {
|
|||||||
|
|
||||||
HttpClient.prototype.cancelAllHttpRequests = function() {
|
HttpClient.prototype.cancelAllHttpRequests = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
$tw.utils.each(this.requests,function(requestInfo,index) {
|
for(var t=this.requests.length - 1; t--; t>=0) {
|
||||||
|
var requestInfo = this.requests[t];
|
||||||
requestInfo.request.cancel();
|
requestInfo.request.cancel();
|
||||||
});
|
}
|
||||||
this.requests = [];
|
this.requests = [];
|
||||||
this.updateRequestTracker();
|
this.updateRequestTracker();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user