From a3c9976f1ed4a033c3eb8671dc0fa4bb1c274c6a Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 21 May 2020 17:41:22 +0200 Subject: dont error when running empty files --- alv/builtin.moon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alv/builtin.moon b/alv/builtin.moon index f4e4d56..c3dfcda 100644 --- a/alv/builtin.moon +++ b/alv/builtin.moon @@ -250,7 +250,8 @@ Evaluate `expr1`, `expr2`, … and return the value of the last expression." eval: (scope, tail) => scope = Scope scope children = [expr\eval scope for expr in *tail] - RTNode :children, result: children[#children].result + last = children[#children] + RTNode :children, result: last and last.result if_ = Constant.meta meta: -- cgit v1.2.3