Fix actions being ran with no students
parent
cbf8ac2f77
commit
ff1c654884
5
api.lua
5
api.lua
|
@ -142,5 +142,8 @@ end
|
||||||
|
|
||||||
function classroom.run_action(aname, runner, selector, params)
|
function classroom.run_action(aname, runner, selector, params)
|
||||||
local action = _action_by_name[aname]
|
local action = _action_by_name[aname]
|
||||||
action.func(runner, classroom.get_students_by_selector(selector))
|
local students = classroom.get_students_by_selector(selector)
|
||||||
|
if #students > 0 then
|
||||||
|
action.func(runner, students)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue