Skip to content

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

@EdgarMC100

Description

@EdgarMC100

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions