mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 17:40:29 +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() {
|
||||
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();
|
||||
});
|
||||
}
|
||||
this.requests = [];
|
||||
this.updateRequestTracker();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user