I am destructuring value out of an object like so;
const response = { data: [] }
const { data: { values } = {} } = response
console logging the value of values
, its a native function instead of undefined
If I change the response
to have an object as the value of the key data
, it works as expected
const response = { data: {} }
const { data: { values } = {} } = response