Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed for use of `type` as a key

  • Loading branch information...
commit df2dc8bd3a42462746f746b64dea3812b5d038a2 1 parent c66aab1
@rauchg rauchg authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/mongoose/schema.js
View
2  lib/mongoose/schema.js
@@ -97,7 +97,7 @@ Schema.prototype.add = function (obj, prefix) {
if (!prefix && !this.tree[i])
this.tree[i] = obj[i];
- if (obj[i].constructor == Object && (!obj[i].type || obj[i].__nested)) {
+ if (obj[i].constructor == Object && (!obj[i].type || obj[i].type.type)) {
if (Object.keys(obj[i]).length)
this.add(obj[i], prefix + i + '.');
else
Please sign in to comment.
Something went wrong with that request. Please try again.