I'm having trouble returning an object from a fetch request.
When I log this to console, it says the promise is pending but [[PromiseResult]] in Dev Tools shows the object correctly.
What would be the most effective way to return this?
async function() {
const response = await fetch(`url`);
const jsonResponse = await response.json();
if (!jsonResponse) {
return [];
}
return jsonResponse;
}