Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovepixelart committed May 9, 2024
1 parent a3341e4 commit 2ff3b04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const isMongooseLessThan7 = satisfies(mongoose.version, '<7')
export const convertToObject = (value: unknown): unknown => {
if (isMongooseLessThan7) {
if (value != null && typeof value === 'object' && !Array.isArray(value) && value.toObject) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
return value.toObject()
}
if (Array.isArray(value)) {
Expand Down

0 comments on commit 2ff3b04

Please sign in to comment.