#31812 closed defect (bug) (fixed)
Remove excess debounce + bind calls
| Reported by: | evansolomon | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | General | Version: | 4.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | ui, accessibility, javascript |
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)
This ticket was mentioned in Slack in #core by helen. View the logs.
11 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Please see related #26600, should be considered for commit together.