mongoose-schema-extend
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -61,4 +61,5 @@ var mongoose = require('mongoose'), | ||
var type = doc[key]; | ||
var model = this.db.model(type); | ||
if(model) { | ||
if(type) { | ||
// this will throw exception if the model isn't registered | ||
var model = this.db.model(type); | ||
var newFn = function() { | ||
@@ -76,3 +77,2 @@ // this is pretty ugly, but we need to run the code below before the callback | ||
} | ||
} | ||
@@ -79,0 +79,0 @@ |
{ | ||
"name": "mongoose-schema-extend", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "mongoose schema inheritance and discriminator key extension", | ||
@@ -33,4 +33,5 @@ "main": "index.js", | ||
"mocha": "~1.3.2", | ||
"should": "~1.1.0" | ||
"should": "~1.1.0", | ||
"mongoose": "~3.5.7" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9619
188
3