I am trying to fetch data from an api. Everything returns as it should when I look in the network call but when I run console.log(response), 'dateModified' shows as 'Invalid Date' even though the network call is fine. Does axios automatically try to convert the date string into a date object or is something else happening? I see no reason why it would be fine on the network call but not when I console.log or try to use the value
Ex: Axios call:
axios.get('/apihere').then((response) => {
console.log(response)
}
returns:
Object {
dateModified: Invalid Date
}
which has an option to expand and show " Date.prototype {...}"
Network call:
Object {
dateModified: "06/02/2022"
}