Debounce no longer passes arguments
rrajewski opened this issue · comments
rrajewski commented
I'm submitting a...
[x] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[x] Feature request
[ ] Documentation issue or request
Current behavior
Adding debounce to a function with parameters, no longer forwards the arguments when the function is called.
example: https://stackblitz.com/edit/angular-fggoh2
@debounce(300)
log(newVal){
this.name = newVal; //newVal is always undefined.
}
I think ln
helpful-decorators/src/debounce.ts
Line 13 in 59944dc
should be
debounced.apply(this, arguments);
Expected behavior
@debounce(300)
log(newVal){
this.name = newVal;
}
newVal would be the value passed on the last call.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-fggoh2
What is the motivation / use case for changing the behavior?
Environment
Browser:
- [x ] Chrome (desktop) version XX
- Chrome (Android) version XX
- Chrome (iOS) version XX
- Firefox version XX
- Safari (desktop) version XX
- Safari (iOS) version XX
- IE version XX
- Edge version XX
Netanel Basal commented
We missed this, you are right, thanks.