Fix actions being ran with no students
parent
cbf8ac2f77
commit
ff1c654884
7
api.lua
7
api.lua
|
@ -141,6 +141,9 @@ function classroom.get_students_by_selector(selector)
|
||||||
end
|
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