about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r--tvix/eval/src/builtins/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index d85d6567ea8a..58fe6bbbcb0c 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -291,6 +291,12 @@ mod pure_builtins {
 
     #[builtin("elemAt")]
     async fn builtin_elem_at(co: GenCo, xs: Value, i: Value) -> Result<Value, ErrorKind> {
+        if xs.is_catchable() {
+            return Ok(xs);
+        }
+        if i.is_catchable() {
+            return Ok(i);
+        }
         let xs = xs.to_list()?;
         let i = i.as_int()?;
         if i < 0 {