fix(muscript): use flatMap
This commit is contained in:
parent
4b5811ee09
commit
3d4c5a06ff
|
@ -227,7 +227,7 @@ public class Runtime {
|
|||
Dynamic lv = evaluate(e.callable(), scope);
|
||||
if (Dynamic.isNull(lv)) throw locationalException(expr, "Cannot invoke null");
|
||||
dc = lv.asCallable();
|
||||
arg = of(e.arguments().stream().map(a -> evaluate(a, scope)).toArray(Dynamic[]::new));
|
||||
arg = of(e.arguments().stream().flatMap(a -> evaluate(a, scope)).toArray(Dynamic[]::new));
|
||||
} catch (RuntimeException ex) {
|
||||
throw locationalException(expr, "Could not perform call successfully", ex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue