Fix Ox.Request.cancel(fn) #2932

Closed
opened 2016-06-22 14:52:54 +00:00 by wjt · 2 comments

The documentation claims:

`cancel(fn)` returns `<undefined>`} cancel all requests where function returns true

but due to a scoping error it in fact raises if there are any outstanding requests. Patch incoming.

The documentation claims: `cancel(fn)` returns `<undefined>`} cancel all requests where function returns true but due to a scoping error it in fact raises <TypeError> if there are any outstanding requests. Patch incoming.
wjt added the
oxjs
label 2016-06-22 14:52:54 +00:00
wjt added this to the 14.04 milestone 2016-06-22 14:52:54 +00:00
rlx was assigned by wjt 2016-06-22 14:52:54 +00:00
wjt added the
normal
defect
labels 2016-06-22 14:52:54 +00:00
Author

(https://gitlab.com/wjt/oxjs.git) branch 2932-Ox.Request.cancel-function

(https://gitlab.com/wjt/oxjs.git) branch `2932-Ox.Request.cancel-function`
Will Thompson commented 2016-06-22 20:18:52 +00:00
Owner

In 869de36/oxjs:

#!CommitTicketReference repository="oxjs" revision="869de3616340b3b8cd35b36e67f42931780c2590"
Fix Ox.Request.cancel(fn) (fixes #2932)

arguments[0] === req inside the forEach callback, so previously this
would throw

    TypeError: arguments[0] is not a function
In [869de36/oxjs](https://code.0x2620.org/0x2620/pandora/commit/869de3616340b3b8cd35b36e67f42931780c2590): ``` #!CommitTicketReference repository="oxjs" revision="869de3616340b3b8cd35b36e67f42931780c2590" Fix Ox.Request.cancel(fn) (fixes #2932) arguments[0] === req inside the forEach callback, so previously this would throw TypeError: arguments[0] is not a function ```
0x2620 added the
fixed
label 2016-06-22 20:18:52 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: 0x2620/pandora#2932
No description provided.