Skip to content

Commit

Permalink
fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
A committed Jun 14, 2015
1 parent 1fb0a45 commit 8d66c79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ var callbacks = [];
*/
function mock(superagent) {

// don't patch if superagent was patched already
if (superagent._patchedBySuperagentMocker) return mock;
superagent._patchedBySuperagentMocker = true;

// The room for matched route
var state = { current: null };

Expand Down

0 comments on commit 8d66c79

Please sign in to comment.