Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle timestamp 0 in prettifyTime (#76)
When trying to format a log object like the following: ```json { "level": 30, "time": 0, "name": "foobar", "msg": "I like cake", "v": 1 } ``` pino-pretty previously tried to format the timestamp `undefined` instead of taking the `0` time. This commit looks not at the truthiness of the value, but its existence.
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters