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

Constructor breaks when an empty log input is received (Date #19

Open
buendiadas opened this issue Jun 2, 2018 · 1 comment
Open

Constructor breaks when an empty log input is received (Date #19

buendiadas opened this issue Jun 2, 2018 · 1 comment

Comments

@buendiadas
Copy link

On pino-elasticsearch:L27

If value equals {}

    } else {
      value.time = (new Date(value.time)).toISOString()
    }

It will return:

RangeError: Invalid time value
    at Date.toISOString (<anonymous>)

And break

@mcollina
Copy link
Member

mcollina commented Jun 2, 2018

Thanks for reporting this! Would you like to send a PR?

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

No branches or pull requests

2 participants