fix(muscript): use flatMap

This commit is contained in:
Johannes Frohnmeyer 2024-04-07 16:48:47 +02:00
parent 4b5811ee09
commit 3d4c5a06ff
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}