jaridmargolin / bouncefix.js

🚫 Stop full body elastic scroll bounce when scrolling inside nested containers (IOS)
http://jaridmargolin.github.io/bouncefix.js/
84 stars 15 forks source link

throwing Error instead of returning a value #1

Closed adambabik closed 10 years ago

adambabik commented 10 years ago

Fix is used as a constructor. In JavaScript constructors cannot return plain values, they always return objects.

I fixed it by returning Error when omitting className argument and added a couple of lines to ensure that Fix is called with new operator.

jaridmargolin commented 10 years ago

Great changes. Thank you.

adambabik commented 10 years ago

You're welcome :)

Thanks for a really nice library. Saved me lots of time!