Skip to content
Browse files

Fixed un-mocked requests.

The original arguments are url and origSettings.  At the beginning of
the function if url is an object, origSettings is set to url and url is
set to undefined.  In Google Chrome on Mac (at least) this means that
arguments ends up being length 1 with just undefined in it.
  • Loading branch information...
1 parent fabfdb8 commit 1a9b7c273254795c9d6b3045f39273792f2f8cdd @ezarko committed Dec 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.mockjax.js
View
2 jquery.mockjax.js
@@ -358,7 +358,7 @@
});
// We don't have a mock request, trigger a normal request
if ( !mock ) {
- return _ajax.apply($, arguments);
+ return _ajax.apply($, [origSettings]);
} else {
return mock;
}

1 comment on commit 1a9b7c2

@zymsys
zymsys commented on 1a9b7c2 Dec 30, 2011

Thanks ezarko - I'm adding unit tests to some existing code and working through ajax requests one at a time with mocks. This really helped me out.

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