I'm getting the following error when retrieving a document with a query containing a select() clause:
TypeError: Cannot read property 'hasOwnProperty' of undefined
at Module.<anonymous> (.../node_modules/mongoose-intl/lib/mongoose-intl.js:62:32)
at VirtualType.applyGetters (.../node_modules/mongoose/lib/virtualtype.js:77:25)
at Module.Document.get (.../node_modules/mongoose/lib/document.js:953:19)
at applyGetters (.../node_modules/mongoose/lib/document.js:2268:22)
at Module.Document.$toObject (.../node_modules/mongoose/lib/document.js:2051:5)
at Module.Document.toJSON (.../node_modules/mongoose/lib/document.js:2330:15)
The error occurs when one or more ìntl-enabled fields are not included in the selected fields.
I see that a similar error has been fixed in #4. Maybe this is a regression caused by the v3 refactoring (or in 3.0.1 with commit 9f21ac4)?
I'm getting the following error when retrieving a document with a query containing a
select()
clause:The error occurs when one or more
ìntl
-enabled fields are not included in the selected fields.I see that a similar error has been fixed in #4. Maybe this is a regression caused by the v3 refactoring (or in 3.0.1 with commit 9f21ac4)?
Package versions:
mongoose@4.12.0
,mongoose-intl@3.0.1