Backendless Support
 
Answered

Production Mode Problem

Hi, I am trying to call function within a for loop, but when I add a closure, the function fails to run. It works in debug mode, but in production mode the function findAllPlaceHits gets hung up and fails to run fully through. I do not think findAllPlaceHits is the problem as it runs in production when it is not enclosed within the closure. I am new to javascript so this may be a simple fix, but I cannot seem to fix the problem. I have attached a screen shot of the code. If I need to provide any more information, let me know. Thanks a lot.

Leave a Comment

Comments (3)

photo
1

I might be wrong (and Vitaly will correct me), but I believe that the top level function must return Promise.all which wraps all the individual promises within.

photo
1

Thanks Mark, I'll try that out and get back to you.

Pat