Function error in Nextjs
Answered
Anon Dev posted this in #help-forum
19 Replies
Add a console.log(latestInvoices). What does it show?
Anon DevOP
still the same thing
No, the console.log can’t fix the bug. The issue here is that latestInvoices is not an array, so I told you to console.log it to see what it is
What’s the output of the console.log()
Anon DevOP
its empty
Komondor
You're not passing an array into the latestInvoices param.
Anon DevOP
is it ok to help out on a call?
Anon DevOP
anyone?
Komondor
Yah I can hop on a call in about an hour
Anon DevOP
Hi, good morning from my end
@Komondor Yah I can hop on a call in about an hour
Anon DevOP
Pls let me know when you are free from now
Komondor
If you can share the code that is using this component I might be able to help you that way
Anon DevOP
ok
Komondor
Can you send the fetchLatestInvoice code too
Anon DevOP
I just figured out the error
Anon DevOP
i didnt add parenthesis to the variable declaration
Answer