Make parameter middleware handler call collection.toArray NON-recursively
This commit is contained in:
parent
7914a8f12e
commit
771fed8002
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user