fix: fix plugins cannot load config

This commit is contained in:
Su-Yong
2023-09-04 03:04:44 +09:00
parent 5069913c56
commit b5472c11df
8 changed files with 9 additions and 11 deletions

View File

@ -104,7 +104,7 @@ export class PluginConfig<T extends OneOfDefaultConfigKey> {
}
get<Key extends keyof ConfigType<T> = keyof ConfigType<T>>(key: Key): ConfigType<T>[Key] {
return this.config[key];
return this.config?.[key];
}
set(key: keyof ConfigType<T>, value: ValueOf<ConfigType<T>>) {