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
{{ message }}
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
Describe the bug
In mongoose, cloning models produces some internal fields that are picked up by mode.schema.eachPath() that have no types which causes an error on Line 183 of registry.ts and other lines following where type is expected to be defined but in fact is undefined.
To Reproduce
Create a schema and a clone it for that model as in the example in the Mongoose Docs
Expected behavior
Mogr should ignore such typeless fields as they are only for internal mongoose/(user?) logic and not projectable anyways.
Desktop (please complete the following information):
Describe the bug
In mongoose, cloning models produces some internal fields that are picked up by
mode.schema.eachPath()
that have no types which causes an error on Line 183 of registry.ts and other lines following wheretype
is expected to be defined but in fact isundefined
.To Reproduce
Create a schema and a clone it for that model as in the example in the Mongoose Docs
Expected behavior
Mogr should ignore such typeless fields as they are only for internal mongoose/(user?) logic and not projectable anyways.
Desktop (please complete the following information):
I imagine just adding a simple
before Line 183 of registry.ts should do the trick
The text was updated successfully, but these errors were encountered: