gemercheung 2 年之前
父节点
当前提交
efcaa41c60
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/room/room.service.ts

+ 1 - 1
src/room/room.service.ts

@@ -105,7 +105,7 @@ export class RoomService {
   ): Promise<void> {
   ): Promise<void> {
     const user = this.initUserProfile(userInfo);
     const user = this.initUserProfile(userInfo);
     const exist = await this.userService.getUsersBy(user.RoomId, user.UserId);
     const exist = await this.userService.getUsersBy(user.RoomId, user.UserId);
-    if ('IsAssistant' in exist) {
+    if (exist && 'IsAssistant' in exist) {
       user.IsAssistant = exist.IsAssistant;
       user.IsAssistant = exist.IsAssistant;
     }
     }
     this._userInfo = user;
     this._userInfo = user;