Skip to content

TypeError: Cannot read property 'paths' of undefined #69

@hamcher

Description

@hamcher

I use custom type in mongodb, but i have an error /lib/plugin.js:270:31
TypeError: Cannot read property 'paths' of undefined

Image.prototype.cast = function(val: any) {
 return {
      name: val,
      options: {
            ... my options
      }
 } 
}

i added in getModelFromPath method this lines it match perfectly

 if (!schema) {
        candidateModel = null
        return
}

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