整理代码,较复杂的单行if-then-end拆成多行
This commit is contained in:
@@ -29,7 +29,9 @@ local function _createRoom()
|
||||
local pw=passwordBox.value
|
||||
if pw==""then pw=nil end
|
||||
local roomname=STRING.trim(roomNameBox.value)
|
||||
if #roomname==0 then roomname=(USERS.getUsername(USER.uid)or"Anonymous").."'s room"end
|
||||
if #roomname==0 then
|
||||
roomname=(USERS.getUsername(USER.uid)or"Anonymous").."'s room"
|
||||
end
|
||||
NET.createRoom(
|
||||
roomname,
|
||||
descriptionBox.value,
|
||||
|
||||
Reference in New Issue
Block a user