You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call the properties method on an error object that has a field of type Date with a value Invalid Date, it tries to call the toISOString method of this object and throws an error: RangeError: Invalid time value.
To reproduce this, do the following:
var stackman = require('stackman')()
var err = new Error('Oops!')
err.number = Number.NaN;
err.date = new Date('invalid')
var props = stackman.properties(err)
console.log(props)
If you comment out err.date = new Date('invalid') or change the value to a valid date, the code works.
The text was updated successfully, but these errors were encountered:
If you call the
properties
method on an error object that has a field of typeDate
with a valueInvalid Date
, it tries to call thetoISOString
method of this object and throws an error:RangeError: Invalid time value
.To reproduce this, do the following:
If you comment out
err.date = new Date('invalid')
or change the value to a valid date, the code works.The text was updated successfully, but these errors were encountered: