Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing typo

  • Loading branch information...
commit 93e367c555a37e2a8837914cbe63f14ced7aeb2a 1 parent ac72adf
@mariuskubilius authored
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/ancestorTree.js
  2. +1 −1  package.json
View
6 lib/ancestorTree.js
@@ -158,8 +158,10 @@ ancestorTree = function(schema){
* @param {ObjectId} [current] items _id which children you are looking.
*/
childrenIdArray: function (current, cb) {
- var nodes = [current];
- this.find({ancestors: current}).distinct('_id', cb(err, result))
+ this.find({ancestors: current}).distinct('_id', function(err, result) {
+ result.push(current);
+ return cb(err, result)
+ })
}
}
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "lbg-mongoose-utils",
- "version": "0.0.6",
+ "version": "0.0.7",
"description": "a collection of plugins used in my projects for mongoose",
"main": "index.js",
"bin": {},
Please sign in to comment.
Something went wrong with that request. Please try again.