Skip to content

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