diff --git a/src/controller/admin/model.js b/src/controller/admin/model.js index 6b5e983aa2145d7bfbd9770f29617bff1652b3f4..c806f059a0125531f48c59b1c10bf29cb2e9e1ce 100644 --- a/src/controller/admin/model.js +++ b/src/controller/admin/model.js @@ -268,7 +268,7 @@ module.exports = class extends think.cmswing.admin { // 将模型添加到钩子 if (!think.isEmpty(data.hooks)) { - for (const h of data.hooks.split(',')) { + for (const h of data.hooks) { const hooks = await this.model('hooks').where({name: h}).find(); let extarr = hooks.ext ? hooks.ext.split(',') : []; extarr.push(data.name);