bug in "cursor.forEach" method
I've tried version 5.0.0 and 5.0.1 of the app and I have some problems executing scripts that runs perfectly in version 4.7.4.
Particularly I have two collections Users and Commune and I have the following simple script:
var commune = db.Commune.findOne();
When I run this in 4.7.4 it displays as a result two communes objects which is fine, but when I run this in 5.0.0 or 5.0.1 it keeps loading and loading without a result.
I figured out that this error has to be with having a find inside a forEach because when I run db.Commune.findOne(); indepently it works fine.