Closed jgladch closed 9 years ago
Thanks for contributing.
If you wanted to show me your project (or any projects you've done with Wad.js), I'd be curious to see it.
As soon as we deploy to production I'll be sure to send you a link. Thanks for the merge. May have more bugfixes coming up soon.
Hello,
First of all, thanks for all the work you've put into this library. I'm using it a lot in a project I've been working on and I've run into a few bugs that I decided to clean up.
There were many parts of the library that attempt to assign default values using the following pattern:
Due to the idiosyncrasies of javascript, when arg.volume is '0', it is interpreted as undefined and the default value of 1 is used instead.
In a lot of places, the way you were assigning defaults didn't matter. Cases like:
Because the default value was 0, it didn't matter.
To fix this issue, I've implemented a utility function that handles the defaulting for us. I've done my best to keep your one-liner style intact as much as possible.
Thanks!