Next.js Discord

Discord Forum

Function error in Nextjs

Answered
Anon Dev posted this in #help-forum
Open in Discord
What can be the error cause?
Answered by Anon Dev
i didnt add parenthesis to the variable declaration
View full answer

19 Replies

Add a console.log(latestInvoices). What does it show?
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
this is the code
its empty
Komondor
You're not passing an array into the latestInvoices param.
is it ok to help out on a call?
anyone?
Komondor
Yah I can hop on a call in about an hour
Hi, good morning from my end
@Komondor Yah I can hop on a call in about an hour
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
ok
Komondor
Can you send the fetchLatestInvoice code too
I just figured out the error
i didnt add parenthesis to the variable declaration
Answer