Merge pull request #1291

# Conflicts:
#	crates/engine/src/tests.rs
This commit is contained in:
Brandon Thomas
2026-10-25 13:42:45 -04:00
2 changed files with 17 additions and 0 deletions
+5
View File
@@ -355,6 +355,11 @@ pub(crate) fn with_param(p: &Value, key: &str, v: Value) -> Value {
/// Targets: `ids` / `id` params, else the selection.
pub(crate) fn targets(s: &Session, p: &Value) -> Result<Vec<ShapeId>> {
if let Some(a) = p.get("ids").and_then(Value::as_array)
&& let Some(v) = a.iter().find(|v| v.as_u64().and_then(|v| u32::try_from(v).ok()).is_none())
{
return Err(bad("shape", format!("`ids` has an invalid shape id: {v}")));
}
if let Some(ids) = ids_param(p, "ids")
&& !ids.is_empty()
{