--- a/crates/jrsonnet-evaluator/src/builtin/mod.rs +++ b/crates/jrsonnet-evaluator/src/builtin/mod.rs @@ -410,6 +410,7 @@ for c in str.chars() { match func.evaluate_simple(s.clone(), &[c.to_string()].as_slice())? { Val::Str(o) => out.push_str(&o), + Val::Null => continue, _ => throw!(RuntimeError( "in std.join all items should be strings".into() )), @@ -427,6 +428,7 @@ out.push(oe?); } } + Val::Null => continue, _ => throw!(RuntimeError( "in std.join all items should be arrays".into() )), @@ -564,6 +566,8 @@ for item in items.iter(s.clone()) { out.push(item?); } + } else if matches!(item, Val::Null) { + continue; } else { throw!(RuntimeError( "in std.join all items should be arrays".into() @@ -585,6 +589,8 @@ } first = false; out += &item; + } else if matches!(item, Val::Null) { + continue; } else { throw!(RuntimeError( "in std.join all items should be strings".into()