wclr / mongoose-fill

Virtual async fileds for mongoose.js
61 stars 8 forks source link

throws and error with mongoose 4.13.7 #18

Open reduxdj opened 6 years ago

reduxdj commented 6 years ago

var multipleProps = __fill.fill.props.length > 1 //args.unshift(doc) args.push(function(err, val){ // if val is not passed, just leave it if (arguments.length > 1 && val !== doc){ if (prop){ doc.set(prop, multipleProps ? val[prop] : val) } else { props.forEach(function(prop){ doc.set(prop, val[prop]) }) }

wclr commented 6 years ago

If you can identify the problem please send a PR.