Commit 4eee6d86 authored by nanahira's avatar nanahira

add constructor in config schema

parent e9e9a5ef
......@@ -51,7 +51,8 @@ export class MyPlugin {
}
apply(ctx: Context, config: PluginConfig) {
ctx.on('service', (name) => {
if (this.config.useDatabase && name === 'database') this.useDatabase = !!ctx.database;
if (this.config.useDatabase && name === 'database')
this.useDatabase = !!ctx.database;
});
this.ctx = ctx;
this.config = config;
......
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