#31812 closed defect (bug) (fixed)
Remove excess debounce + bind calls
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | General | Keywords: | has-patch |
Focuses: | ui, accessibility, javascript | Cc: |
Description
The function being called (doSearch
) is already debounced and in the correct this
context. Calling _.debounce(someFunction, timeout)(args)
is essentially the same thing as setTimeout(function () {someFunction(args)}, timeout)
, which doesn't really make sense here.
Since doSearch
is already debounced there's no reason for delaying the call to it, and which point there's no reason for binding to the current context, at which point it can just be a plain old boring function call.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Please see related #26600, should be considered for commit together.