Can you provide some more details?
It looks like the function already returns lineItemsArr.
However, you do not include enough of the code to see where this variable is set or what value it should have.
I wrongly assumed the error I was getting has something to do with async function that I haven’t learned yet.
The cause was actually in passing the return of the function to a different function.
The code seems to be working fine. Thank you.