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

Fix inspect/toJSON methods on structures to only omit undefined values, not all falsy ones #400

Merged
merged 2 commits into from
Jul 16, 2018

Conversation

eritbh
Copy link
Contributor

@eritbh eritbh commented Jul 3, 2018

Should be self-explanatory. Also:

  • Fixed a typo which would prevent editedTimestamp from showing up in the output of Message#toJSON().
  • Fixed Message#editedTimestamp being NaN instead of null on unedited messages

Also fixes an issue with toJSON for messages having a typo'd prop name
@eritbh eritbh changed the title Fix inspect methods on structures to only omit undefined values, not all falsy ones Fix inspect/toJSON methods on structures to only omit undefined values, not all falsy ones Jul 3, 2018
@LJNeon
Copy link
Contributor

LJNeon commented Jul 3, 2018

I wouldn't be surprised at all if Message#editedTimestamp wasn't a one time thing, maybe make sure the same problem doesn't occur anywhere else?

@eritbh
Copy link
Contributor Author

eritbh commented Jul 4, 2018

Quick GitHub search for editTimestamp doesn't show any other results, I can do a better full check tomorrow

@abalabahaha abalabahaha added the bug label Jul 4, 2018
@abalabahaha abalabahaha merged commit 94019f1 into abalabahaha:dev Jul 16, 2018
macdja38 pushed a commit to macdja38/eris that referenced this pull request Dec 5, 2018
Actually exclude undefined props while keeping falsy props

94019f1/abalabahaha#400 made some bad assumptions about order of operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants