Fix slug guide

Referts to @abdonrd comment on PR #4398
This commit is contained in:
Jim LAURIE 2020-01-20 14:41:10 +01:00 committed by GitHub
parent 3cb7810d69
commit 93a78f198b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ module.exports = {
}
},
beforeUpdate: async model => {
if (model.getUpdate().title) {
if (model.getUpdate() && model.getUpdate().title) {
model.update({
slug: slugify(model.getUpdate().title),
});