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
I was using $type instead of type for my typeKey in mongoose, and it throws an ugly error:
throw new TypeError('Undefined type `' + name + '` at `' + path +
^
TypeError: Undefined type `undefined` at `slug.trim`
Did you try nesting Schemas? You can only nest using refs or arrays.
Thanks for bringing this to attention, I'll see what's needed to get this supported, however I am really busy these days and can't promise anything. I would merge a PR for this.
I was using
$type
instead oftype
for my typeKey in mongoose, and it throws an ugly error:The code I was using is specified in the mongoose docs here
I rewrote it to use
'type'
instead, but it would be nice if it played nice with mongoose's ability to specify custom typeKeys.The text was updated successfully, but these errors were encountered: