Permalink
Browse files

Merge branch 'master' of github.com:LearnBoost/mongoose

  • Loading branch information...
aheckmann committed Oct 12, 2011
2 parents cb7ac9d + 62c6419 commit 4336909a23222c33685218321e05c0e03e10555e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/model.js
View
@@ -194,7 +194,7 @@ Model.prototype.init = function init (doc, query, fn) {
var i = keys[len]
, path = prefix + i
, schema = self.schema.path(path)
- , poppath = populate[path]
+ , poppath = utils.clone(populate[path])//in execution context this parametes is changed and became inconsistent
, total = 0
if (!schema && obj[i] && 'Object' === obj[i].constructor.name) {

0 comments on commit 4336909

Please sign in to comment.