Commit a65fe5a1 authored by nanahira's avatar nanahira

allow plugin abort

parent d96bd55f
......@@ -194,6 +194,9 @@ export function KoishiPlugin<T = any>(
pluginDesc: KoishiModulePlugin<any>,
) {
const pluginCtx = applySelector(baseContext, pluginDesc);
if (pluginDesc == null) {
return;
}
if (!pluginDesc || !pluginDesc.plugin) {
throw new Error(`Invalid plugin from method ${methodKey}.`);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment