Skip to content

Lesson 13: TypeError: Cannot read properties of undefined (reading 'toString') #4854

Answered by pacelliv
AmitKochar1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Sol-Devloper, I think the issue is that in line 45 you are returning with parenthesis and not with curly braces, also you need to reorder the variables so when you destructure the object on line 24 in the main function, the names of the keys matches the ones in the return statement.

The undefined error should be solved If you make the return statement in line 45 look like this:

return { availableBorrowsETH, totalDebtETH }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AmitKochar1
Comment options

@pacelliv
Comment options

Answer selected by AmitKochar1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants