Permalink
Browse files

test for null.

  • Loading branch information...
1 parent af8d78c commit bc27b716d5da7f80e134f24cba6baf1ab4206fb5 @JoshuaGross committed Nov 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongoose-subpopulate.js
@@ -454,7 +454,7 @@ function wrapModelObject (object, cacheData, callback) {
}
var referencedObject = wrappedObject[i];
- if ('undefined' !== typeof referencedObject) {
+ if ('undefined' !== typeof referencedObject && 'null' !== typeof referencedObject) {
if (referencedObject.getBare) {
referencedObject.getBare(subfields, function (err, dict) {
bareDictionary[i] = dict;

0 comments on commit bc27b71

Please sign in to comment.