@@ -57,11 +57,11 @@ function getIdsForMany(parentResult, fieldStorage) {
57
57
58
58
// Option A.
59
59
if ( nested . length === 0 ) {
60
- return _ . isArray ( value ) ? value : [ value ] ;
60
+ return Array . isArray ( value ) ? value : [ value ] ;
61
61
}
62
62
63
63
// Option C.
64
- if ( _ . isArray ( value ) ) {
64
+ if ( Array . isArray ( value ) ) {
65
65
return _ . flatten ( value . map ( v => getIdsFromObject ( v , nested . join ( '.' ) ) ) ) ;
66
66
}
67
67
@@ -75,7 +75,7 @@ function getIdsForMany(parentResult, fieldStorage) {
75
75
76
76
function getIdsFromObject ( object , path ) {
77
77
const pickedValue = dot . pick ( path , object ) ;
78
- return _ . isArray ( pickedValue ) ? pickedValue : ( ( _ . isUndefined ( pickedValue ) || _ . isNull ( pickedValue ) ) ? [ ] : [ pickedValue ] ) ;
78
+ return Array . isArray ( pickedValue ) ? pickedValue : ( ( _ . isUndefined ( pickedValue ) || _ . isNull ( pickedValue ) ) ? [ ] : [ pickedValue ] ) ;
79
79
}
80
80
81
81
export function assembleMany ( parentResult , {
@@ -94,7 +94,7 @@ export function assembleMany(parentResult, {
94
94
}
95
95
96
96
const [ , ...nestedLinkPath ] = childCollectionNode . linkName . split ( '.' ) ;
97
- if ( nestedLinkPath . length > 0 && _ . isArray ( rootValue ) ) {
97
+ if ( nestedLinkPath . length > 0 && Array . isArray ( rootValue ) ) {
98
98
rootValue . forEach ( result => {
99
99
const results = _ . flatten ( _ . union ( ...getIdsForMany ( result , rest . join ( '.' ) ) . map ( id => resultsByKeyId [ id ] ) ) ) ;
100
100
const data = filterAssembledData (
@@ -173,7 +173,7 @@ export function assembleOne(parentResult, {
173
173
// todo: using linker.linkName should be correct here since it should be the same as childCollectionNode.linkName
174
174
const path = childCollectionNode . linkName . split ( '.' ) ;
175
175
176
- if ( _ . isArray ( rootValue ) ) {
176
+ if ( Array . isArray ( rootValue ) ) {
177
177
rootValue . forEach ( result => {
178
178
const value = dot . pick ( rest . join ( '.' ) , result ) ;
179
179
const data = filterAssembledData (
0 commit comments