Browse Source

Fix bug in mockResponseAsync

pull/2300/head
jlukic 9 years ago
parent
commit
89f35d3a49
1 changed files with 1 additions and 1 deletions
  1. 2
      src/definitions/behaviors/api.js

2
src/definitions/behaviors/api.js

@ -474,7 +474,7 @@ $.api = $.fn.api = function(parameters) {
else if( $.isFunction(settings.mockResponseAsync) ) {
callback = function(response) {
module.verbose('Async callback returned response', response);
module.request.resolveWith(context, response);
module.request.resolveWith(context, [response]);
};
module.debug('Using async mocked response', settings.mockResponseAsync);
settings.mockResponseAsync.call(context, settings, callback);

Loading…
Cancel
Save