Fawn
Fawn copied to clipboard
Fix error with Fawn.init in mongoose ^6.0.5
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
Thankyou for this "&& (obj.modelSchemas || obj.Schema)" it work for me :)