Commit 5e87f062 authored by nanahira's avatar nanahira

fix

parent ab522424
......@@ -144,7 +144,12 @@ export function DefinePlugin<T = any>(
view: Record<string, any> = {},
) {
const conditions = reflector.getArray('KoishiIf', this, methodKey);
if (conditions.some((condition) => !condition(this, view))) return;
if (
conditions.some(
(condition) => !condition(this, { ...this.__config, ...view }),
)
)
return;
const ctx = this.__registrar.getScopeContext(
this.__ctx,
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