koishi-plugin-qq-full-message 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -49,9 +49,12 @@ function collectFromConfig(node, out) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// 拿到 loader 服务(只有通过 koishi 配置文件启动时才存在)。
|
|
52
|
+
// 只用 ctx.get():直接读 ctx.loader 在该服务没注册时会打
|
|
53
|
+
// "property loader is not registered" 的错误日志。
|
|
52
54
|
function getLoader(ctx) {
|
|
53
55
|
try {
|
|
54
|
-
|
|
56
|
+
if (typeof ctx.get === 'function') return ctx.get('loader')
|
|
57
|
+
return ctx.loader
|
|
55
58
|
} catch {
|
|
56
59
|
return
|
|
57
60
|
}
|