Fix unit test failure due to lack of string.trim() function
parent
9540b1b118
commit
c46122556c
1
api.lua
1
api.lua
|
@ -74,7 +74,6 @@ function classroom.get_group(name)
|
|||
end
|
||||
|
||||
function classroom.create_group(name)
|
||||
name = name:trim()
|
||||
if _groups[name] or #name == 0 then
|
||||
return nil
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
return false
|
||||
end
|
||||
|
||||
local group = classroom.create_group(fields.name)
|
||||
local group = classroom.create_group(fields.name:trim())
|
||||
if group then
|
||||
sfinv.set_player_inventory_formspec(player)
|
||||
classroom.show_edit_group(player, group.name)
|
||||
|
|
Loading…
Reference in New Issue