fix: 修复执行

This commit is contained in:
ningmengchongshui 2024-06-15 11:54:55 +08:00
parent 5ba07d4765
commit 6472e0caf0
2 changed files with 5 additions and 4 deletions

@ -1 +1 @@
Subproject commit 9fcf22ccbec7cfef74d0846240395a4af622c9ff
Subproject commit 47897176e2805a092fb2c06ac6f3ca689d6818b0

View File

@ -340,6 +340,8 @@ class PluginsLoader {
*
*/
for (const plugin of priority) {
console.log('plugin', plugin.add)
/**
* hook
*/
@ -352,8 +354,7 @@ class PluginsLoader {
let ret
for (const fnc in context) {
// 不是函数,错误插件错误写法
if (typeof plugin[fnc] !== 'function') {
// logger.info(plugin, fnc, '不是函数')
if (!plugin[fnc]) {
continue
}
ret ||= await plugin[fnc](context[fnc])
@ -415,7 +416,7 @@ class PluginsLoader {
try {
const start = Date.now()
// 不是函数。
if (typeof plugin[v.fnv] !== 'function') {
if (!plugin[v.fnc]) {
continue
}
const res = await plugin[v.fnc](e)