angelnikolov / ts-cacheable

Observable/Promise Cache Decorator
https://npmjs.com/package/ts-cacheable
ISC License
340 stars 42 forks source link

Default arguments in functions not working #30

Closed fimius23 closed 5 years ago

fimius23 commented 5 years ago

If I have a default argument in a function, and pass void 0 to the function call, the default argument does not get applied. Looks like your method of cloning parameters turns undefined into null. This time I do have a working example... :)

https://stackblitz.com/edit/angular-gvjnvx?file=src%2Fapp%2Ftest.service.spec.ts

angelnikolov commented 5 years ago

@fimius23 Nice one! Fixed and tested. Will publish 1.1.5 in a minute. Thanks!!!