Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

isTimeout with jQuery Deferred callbacks doesn't work #63

Closed
michaelbrooks opened this Issue · 1 comment

3 participants

@michaelbrooks

I had an error using isTimeout in mockjax with jQuery's Deferred callbacks (http://api.jquery.com/category/deferred-object/).

I'm using jQuery version 1.7.2, but there were errors with earlier versions as well. I created a test demonstrating the problem in this repo: https://github.com/michaelbrooks/jquery-mockjax

The error was on line 181 of jquery.mockjax.js, where it attempts to call requestSettings.error(), but no such function exists.

I have no idea how to fix this, but hopefully this is helpful. I see there have been earlier changes to make mockjax work with deferred callbacks (#37) but this problem seems to be particular to the case of using isTimeout.

@mlynch

Taking a look at this right now. Thanks.

@jdsharp jdsharp closed this issue from a commit
@mlynch mlynch Fixed isTimeout issue for deferred-style ajax requests. Fixes #63
This fix also changes some of the behavior of timeouts, namely it no
longer manually calls error or complete on timeout. Instead, it lets
jQuery handle that, as it should.
b0b29d9
@jdsharp jdsharp closed this in b0b29d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.