Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Please support Sub-Document #34

Open
libook opened this issue Dec 7, 2016 · 1 comment
Open

Please support Sub-Document #34

libook opened this issue Dec 7, 2016 · 1 comment

Comments

@libook
Copy link

libook commented Dec 7, 2016

http://mongoosejs.com/docs/subdocs.html

When I am using Sub-Document. There is an error.

/home/project/node_modules/mongoose-history/lib/mongoose-history.js:31
    var history = new hm.HistoryModel(hm.historyCollectionName(this.collection.name, customCollectionName), options)(historyDoc);
                                                                              ^

TypeError: Cannot read property 'name' of undefined
    at Document.<anonymous> (/home/project/node_modules/mongoose-history/lib/mongoose-history.js:31:79)
    at _next (/home/project/node_modules/hooks-fixed/hooks.js:62:30)
    at fnWrapper (/home/project/node_modules/hooks-fixed/hooks.js:186:8)
    at Document.<anonymous> (/home/project/node_modules/mongoose-timestamp/index.js:56:6)
    at _next (/home/project/node_modules/hooks-fixed/hooks.js:62:30)
    at fnWrapper (/home/project/node_modules/hooks-fixed/hooks.js:186:8)
    at Document.fn (/home/project/node_modules/mongoose/lib/schema.js:223:11)
    at _next (/home/project/node_modules/hooks-fixed/hooks.js:62:30)
    at fnWrapper (/home/project/node_modules/hooks-fixed/hooks.js:186:8)
    at Document.fn (/home/project/node_modules/mongoose/lib/schema.js:177:18)
    at Document._next (/home/project/node_modules/hooks-fixed/hooks.js:62:30)
    at Document.proto.(anonymous function) [as $__original_save] (/home/project/node_modules/hooks-fixed/hooks.js:108:20)
    at /home/project/node_modules/mongoose/lib/document.js:1966:24
    at new Promise.ES6 (/home/project/node_modules/mongoose/lib/promise.js:45:3)
    at Document.wrappedPointCut [as save] (/home/project/node_modules/mongoose/lib/document.js:1946:21)
    at i (/home/project/node_modules/mongoose/lib/schema.js:229:18)
@wheresvic
Copy link
Contributor

Duplicate of #33

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants