修复未设置通知时通知报错

This commit is contained in:
whyour 2024-06-23 22:22:36 +08:00
parent a45efbd69b
commit 0d492e94f4

View File

@ -351,7 +351,7 @@ export default class UserService {
public async getNotificationMode(): Promise<NotificationInfo> {
const doc = await this.getDb({ type: AuthDataType.notification });
return doc.info as NotificationInfo;
return (doc.info || {}) as NotificationInfo;
}
private async updateAuthDb(payload: SystemInfo): Promise<any> {