#14104 closed bug (notabug)
$.ajax promise cannot be piped with a failFilter only
Reported by: | 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
Change History (2)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
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
Note: See
TracTickets for help on using
tickets.
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.