Skip to content
This repository
Browse code

add .aborted prop

  • Loading branch information...
commit a71ca69c468a8b087fe0b99a221eaaf243de39e8 1 parent dd583ce
TJ Holowaychuk authored

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  lib/superagent.js
2  lib/superagent.js
@@ -409,8 +409,10 @@
409 409 */
410 410
411 411 Request.prototype.abort = function(){
  412 + if (this.aborted) return;
412 413 this.xhr.abort();
413 414 this.emit('abort');
  415 + this.aborted = true;
414 416 return this;
415 417 };
416 418

0 comments on commit a71ca69

Please sign in to comment.
Something went wrong with that request. Please try again.