1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Discard returns values from choices

This commit is contained in:
Étienne Fildadut 2021-04-12 17:36:18 +02:00
parent f9edaff7e7
commit e454888b9f
4 changed files with 61 additions and 1 deletions

View file

@ -143,7 +143,8 @@ local function run_line(state, line)
local v, e = run_block(state, choice.block)
tags:pop(state)
if e then return v, e end
if v then return v end
-- discard return value from choice block as the execution is delayed until an event flush
-- and we don't want to stop the execution of another function unexpectedly
end
end
end