Fix error when no backend specified
This commit is contained in:
@@ -17,9 +17,9 @@ export abstract class Backend<C extends BackendSettings> {
|
||||
}
|
||||
|
||||
public remind(config: Config, notification: Notification) {
|
||||
const cfg = config.backend[this.name] as Partial<C>;
|
||||
const cfg = config?.backend?.[this.name] as Partial<C> | undefined;
|
||||
|
||||
if (cfg.enable !== true) {
|
||||
if (cfg?.enable !== true) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user