mirror of
https://github.com/strapi/strapi.git
synced 2025-12-09 22:20:41 +00:00
Using returning promise instead of callbacks
This commit is contained in:
parent
c51c6b06c5
commit
42d4543802
@ -130,8 +130,7 @@ module.exports = ({ models, target, plugin = false }, ctx) => {
|
||||
if (_.isFunction(target[model.toLowerCase()][fn])) {
|
||||
schema.pre(key, function(next) {
|
||||
return target[model.toLowerCase()]
|
||||
[fn](this)
|
||||
.then(next);
|
||||
[fn](this);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user