mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 22:54:31 +00:00
Use latest release of Mongoose & add comment to explain post remove comment issue
This commit is contained in:
parent
6733dbf317
commit
4afc8a2390
@ -144,6 +144,8 @@ module.exports = function (strapi) {
|
||||
save: 'afterSave'
|
||||
};
|
||||
|
||||
// Mongoose doesn't allow post 'remove' event on model.
|
||||
// See https://github.com/Automattic/mongoose/issues/3054
|
||||
_.forEach(postLifecycle, (fn, key) => {
|
||||
if (_.isFunction(target[model.toLowerCase()][fn])) {
|
||||
collection.schema.post(key, function (doc, next) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"main": "./lib",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.4",
|
||||
"mongoose": "^5.0.4",
|
||||
"mongoose": "^5.0.15",
|
||||
"mongoose-float": "^1.0.2",
|
||||
"pluralize": "^6.0.0",
|
||||
"strapi-utils": "3.0.0-alpha.12"
|
||||
@ -48,4 +48,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user