Home

Issue: 2381

Error when used with Mongoose: Object prototype may only be an Object or null: undefined

[issue link]

Apologies in advance if this is the wrong place to report this issue. The issue is with the Mongoose package, but Nuxt is causing it. So I’ve reported it on both repos.

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
Throws a TypeError when using populate / virtual populate.

If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/zikeji/nuxt-mongoose-interaction-bug

What is the expected behavior?
Not to throw a TypeError and ignore that ref field altogether. It should return the references.

Please mention your node.js, mongoose and MongoDB version.
v.8.9.3, 4.13.7, 3.0.0-rc0

This question is available on Nuxt.js community (#c2070)