gemercheung 3 éve
szülő
commit
49911c96dc
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      src/controller/room/index.js

+ 2 - 1
src/controller/room/index.js

@@ -104,7 +104,8 @@ export class RoomController extends BasicController {
       }
       }
       if (user.oid) {
       if (user.oid) {
         const hasDuplicateUser = await this.roomAssistant.getOpenidInRoom(this.roomId, user.oid);
         const hasDuplicateUser = await this.roomAssistant.getOpenidInRoom(this.roomId, user.oid);
-        if (hasDuplicateUser.length > 0) {
+        console.log("hasDuplicateUser", typeof hasDuplicateUser);
+        if (hasDuplicateUser && hasDuplicateUser.length > 0) {
           this.logger.info(
           this.logger.info(
             "hasDuplicateUser",
             "hasDuplicateUser",
             hasDuplicateUser.reduce((prev, current) => {
             hasDuplicateUser.reduce((prev, current) => {