Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

debounce implementation doesn't pass arguments to debounced function #4859

Closed
dfsq opened this issue Nov 10, 2015 · 2 comments
Closed

debounce implementation doesn't pass arguments to debounced function #4859

dfsq opened this issue Nov 10, 2015 · 2 comments

Comments

@dfsq
Copy link
Contributor

dfsq commented Nov 10, 2015

The current implementation incorrectly converts arguments collection into args array. As the result original function is invoked without arguments even if debounced function is called with some.

Here is the demo with the debounce code from original commit.
http://plnkr.co/edit/f1kCAlHOcVznlv3Yh5IG?p=preview

Only the little thing is missing Array.prototype.slice.call(arguments) instead of Array.prototype.slice(arguments). Try adding call in the demo above to see how it should work.

@dfsq
Copy link
Contributor Author

dfsq commented Nov 21, 2015

By the way, this is still not fixed, after the fix was reverted in 1e19292 commit.

@wesleycho
Copy link
Contributor

Based on what I was told, it was by accident - undid the revert in dd6ddc8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants