You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setters are not fired with undefined value assigned to path.
mongoose=require"mongoose"Schema=mongoose.SchemaPerson=newSchemaname:StringPerson.path( "name" ).set ( x ) ->console.log"called with value <#{x}> of type #{typeof x}"
x
Person=mongoose.model"Person", Person
p=newPerson( )
p.name="John"p.name=undefined
Output is:
called with value <John> of type string
The text was updated successfully, but these errors were encountered:
Setters are not fired with
undefined
value assigned to path.Output is:
The text was updated successfully, but these errors were encountered: