forked from mirrors/webxoss-core
🐛 fix client.room.name error when rename room
This commit is contained in:
parent
2e9178858e
commit
c3990a1dbc
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ RoomManager.prototype.renameRoom = function (client,cfg) {
|
|||
if (!isObj(cfg) || !isStr(cfg.roomName)) {
|
||||
errMsg = 'INVALID_CONFIG';
|
||||
}
|
||||
var oldRoomName = client.room.name;
|
||||
var oldRoomName = (client.room || {}).name || '';
|
||||
var newRoomName = cfg.roomName;
|
||||
if (newRoomName === oldRoomName) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue