Side navigation
#14104 closed bug (notabug)
Opened July 04, 2013 02:07PM UTC
Closed July 04, 2013 03:11PM UTC
Last modified January 04, 2014 12:35AM UTC
$.ajax promise cannot be piped with a failFilter only
Reported by: | gregor@martynus.net | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
request = $.ajax({url: '/'}).pipe( null, handleError )
I'd expect that the request would be the original promise returned by $.ajax, but the abort
method does not exist anymore. Is this a bug or by design? Any suggestion on how to work around it in an elegant manner?
Both version are affected, 2.0.3 as well as 1.9.1
Attachments (0)
Change History (2)
Changed July 04, 2013 03:11PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Changed January 04, 2014 12:35AM UTC by comment:2
FWIW I've made a little library to make our lives easier if you want to retain properties across piped deferreds: https://github.com/onyxrev/jquery_promiscuous_deferred
The result of a
.pipe()
is a newDeferred
, not the originaljQXHR
, so it doesn't have an.abort()
method. Save the result of$.ajax()
if you need to abort.