mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #11907 from meteor/fix/mongo-insert-return-sync
Fix sync return for insert methods inside _collection private method
This commit is contained in:
@@ -391,7 +391,7 @@ MongoConnection.prototype._insert = function (collection_name, document,
|
||||
safe: true,
|
||||
}
|
||||
).then(({insertedId}) => {
|
||||
callback(null, transformResult({ result : {modifiedCount : insertedId ? 1 : 0} }).numberAffected);
|
||||
callback(null, insertedId);
|
||||
}).catch((e) => {
|
||||
callback(e, null)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user