Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setters - falsey values #32

Merged
merged 1 commit into from
Oct 25, 2011
Merged

setters - falsey values #32

merged 1 commit into from
Oct 25, 2011

Conversation

braddunbar
Copy link
Contributor

When using setters with falsey values (e.g. 0) the getter is called instead. This is fixed by a null comparison to use the setter for anything but null and undefined.

timrwood added a commit that referenced this pull request Oct 25, 2011
@timrwood timrwood merged commit bf74079 into moment:dev Oct 25, 2011
@timrwood
Copy link
Member

Great, thanks for writing unit tests too!

@timrwood
Copy link
Member

This is in 1.1.0 and has been published in npm.

@braddunbar
Copy link
Contributor Author

Thanks @timrwood! Still very much enjoying this library.

@timrwood
Copy link
Member

Glad you like it, thanks for contributing!

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

Successfully merging this pull request may close these issues.

2 participants