File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1581,9 +1581,7 @@ class ApiGateway {
15811581 * @private
15821582 */
15831583 private wrapAdapterQueryResultIfNeeded ( res : any ) : ResultWrapper {
1584- if ( ! ( res . data instanceof ResultWrapper ) ) {
1585- res . data = new ResultWrapper ( null , res . data ) ;
1586- }
1584+ res . data = new ResultWrapper ( res . data ) ;
15871585
15881586 return res ;
15891587 }
Original file line number Diff line number Diff line change @@ -24,15 +24,26 @@ export class ResultWrapper extends BaseWrapper implements DataResult {
2424
2525 private readonly isNative : Boolean = false ;
2626
27+ private readonly nativeReference : any ;
28+
29+ private readonly jsResult : any = null ;
30+
2731 private transformData : any ;
2832
2933 private rootResultObject : any = { } ;
3034
31- public constructor ( private readonly nativeReference : any , private readonly jsResult : any = null ) {
35+ public constructor ( input : any ) {
3236 super ( ) ;
3337
34- if ( nativeReference ) {
38+ if ( input . isWrapper ) {
39+ return input ;
40+ }
41+
42+ if ( Array . isArray ( input ) ) {
43+ this . jsResult = input ;
44+ } else {
3545 this . isNative = true ;
46+ this . nativeReference = input ;
3647 }
3748
3849 this . proxy = new Proxy ( this , {
You can’t perform that action at this time.
0 commit comments