File tree 1 file changed +7
-10
lines changed
packages/cubejs-backend-native/js
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,19 @@ export class CubeStoreResultWrapper {
16
16
return array [ Number ( prop ) ] ;
17
17
}
18
18
19
- // intercept array methods
19
+ // intercept isNative
20
+ if ( prop === 'isNative' ) {
21
+ return true ;
22
+ }
23
+
24
+ // intercept array props and methods
20
25
if ( typeof prop === 'string' && prop in Array . prototype ) {
21
26
const arrayMethod = ( Array . prototype as any ) [ prop ] ;
22
27
if ( typeof arrayMethod === 'function' ) {
23
28
return ( ...args : any [ ] ) => this . invokeArrayMethod ( prop , ...args ) ;
24
29
}
25
- }
26
30
27
- // intercept isNative
28
- if ( prop === 'isNative' ) {
29
- return true ;
30
- }
31
-
32
- // intercept array length
33
- if ( prop === 'length' ) {
34
- return this . getArray ( ) . length ;
31
+ return ( this . getArray ( ) as any ) [ prop ] ;
35
32
}
36
33
37
34
// intercept JSON.stringify or toJSON()
You can’t perform that action at this time.
0 commit comments