We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref
adminjs-mongoose/src/property.ts
Lines 72 to 80 in b35f89f
This part requires another update because the ref in mongoose can be defined as string | Model<any> | ((this: any, doc: any) => string | Model<any>);
string | Model<any> | ((this: any, doc: any) => string | Model<any>);
Right now this logic correctly handles ref: string | Model but not the ref: () => string | Model part
ref: string | Model
ref: () => string | Model
Line 77 should be updated to
if (typeof ref === 'function') return ref.modelName || ref().modelName
Lmk what you think
The text was updated successfully, but these errors were encountered:
No branches or pull requests
adminjs-mongoose/src/property.ts
Lines 72 to 80 in b35f89f
This part requires another update because the
ref
in mongoose can be defined asstring | Model<any> | ((this: any, doc: any) => string | Model<any>);
Right now this logic correctly handles
ref: string | Model
but not theref: () => string | Model
partLine 77 should be updated to
Lmk what you think
The text was updated successfully, but these errors were encountered: