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 @@ -1601,9 +1601,7 @@ class ApiGateway {
16011601 * @private
16021602 */
16031603 private wrapAdapterQueryResultIfNeeded ( res : any ) : ResultWrapper {
1604- if ( ! ( res . data instanceof ResultWrapper ) ) {
1605- res . data = new ResultWrapper ( null , res . data ) ;
1606- }
1604+ res . data = new ResultWrapper ( res . data ) ;
16071605
16081606 return res ;
16091607 }
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