You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the inner save of Carl like a blackhole, it never get returned and the console.log never got called.
I dig into the lib/tree.js and finally find that at line 45, "priviousePath" variable is undefined, I think the if condition to enter this block should also check the value of previousPath, if(isParentChange && previousPath !== undefined ) { // When the parent is changed we must rewrite all children paths as well self.collection.find({ path : { '$regex' : '^' + previousPath + pathSeparator } }, function(err, cursor) { if(err) return next(err);
The text was updated successfully, but these errors were encountered:
Here is my code to create the tree:
`var Bob = new User({ name: 'Bob' });
var Carl = new User({ name: 'Carl' });
Carl.parent = Bob;
Bob.save(function(){
Carl.save(function(){
console.log(Carl);
});
});`
But the inner save of Carl like a blackhole, it never get returned and the console.log never got called.
I dig into the lib/tree.js and finally find that at line 45, "priviousePath" variable is undefined, I think the if condition to enter this block should also check the value of previousPath,
if(isParentChange && previousPath !== undefined ) { // When the parent is changed we must rewrite all children paths as well self.collection.find({ path : { '$regex' : '^' + previousPath + pathSeparator } }, function(err, cursor) { if(err) return next(err);
The text was updated successfully, but these errors were encountered: