Fix missing invocation errors (#1846)

This commit is contained in:
Chris Pearce
2020-05-20 00:57:25 +12:00
committed by GitHub
parent b89976daef
commit ae87582cb6
2 changed files with 14 additions and 0 deletions

View File

@ -198,6 +198,10 @@ async fn evaluate_invocation(
let output = result.into_vec().await;
if let Some(e) = context.get_errors().get(0) {
return Err(e.clone());
}
match output.len() {
x if x > 1 => Ok(UntaggedValue::Table(output).into_value(Tag::unknown())),
1 => Ok(output[0].clone()),