Last active
August 29, 2015 14:15
-
-
Save Grantismo/e8dc06d51718be0df3bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//obj1 and obj2 are mongoose models | |
//Doesn't work | |
aync.parallel([obj1.save, obj2.save], function(err, results){ | |
//do stuff after both objects save | |
}); | |
//Works | |
aync.parallel([obj1.save.bind(obj1), obj2.save.bind(obj2)], function(err, results){ | |
//do stuff after both objects save | |
}); |
niftylettuce
commented
Feb 16, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment