Make parameter middleware handler call collection.toArray NON-recursively

This commit is contained in:
Garrett Mills 2022-04-05 10:41:23 -05:00
parent 7914a8f12e
commit 771fed8002
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@extollo/lib",
"version": "0.9.27",
"version": "0.9.28",
"description": "The framework library that lifts up your code.",
"main": "lib/index.js",
"types": "lib/index.d.ts",

View File

@ -39,7 +39,7 @@ export class ExecuteResolvedRoutePreflightHTTPModule extends AbstractResolvedRou
return unleft(resolveResult)
}
route.resolvedParameters = unright(resolveResult).toArray()
route.resolvedParameters = unright(resolveResult).toArray(false)
}
return request

View File

@ -1294,10 +1294,10 @@ class Collection<T> {
/**
* Cast the collection to an array.
*/
toArray(): any[] {
toArray(recursive = true): any[] {
const returns: any = []
for ( const item of this.storedItems ) {
if ( item instanceof Collection ) {
if ( recursive && item instanceof Collection ) {
returns.push(item.toArray())
} else {
returns.push(item)