Fawn icon indicating copy to clipboard operation
Fawn copied to clipboard

Fix error with Fawn.init in mongoose ^6.0.5

Open olalekanteeblaze opened this issue 2 years ago • 1 comments

There's an issue with initializing Fawn in mongoose ^6.0.5. This comes from the isMongoose function. the modelSchemas object of the mongoose instance has been replaced with Schema from the recent version of mongoose. So this leads to the function returning false even when the mongoose instance is valid

olalekanteeblaze avatar Oct 29 '21 22:10 olalekanteeblaze

Thankyou for this "&& (obj.modelSchemas || obj.Schema)" it work for me :)

EmmanDizon avatar Nov 15 '21 14:11 EmmanDizon