carlosazaustre/node-api-rest-2017

Arrow function "this" scope used as callback UserSchema.pre(string,callback) in User Model

Opened this issue · 0 comments

Should be changed to function(){} because "this" points to global scope, not function scope in arrow functions. In this case use function(){} instead