@@ -12,7 +12,6 @@ import {
12
12
deepDiffer ,
13
13
flattenStyle ,
14
14
} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface' ;
15
- import isArray from 'shared/isArray' ;
16
15
17
16
import type { AttributeConfiguration } from './ReactNativeTypes' ;
18
17
@@ -52,7 +51,7 @@ function restoreDeletedValuesInNestedArray(
52
51
node : NestedNode ,
53
52
validAttributes : AttributeConfiguration ,
54
53
) {
55
- if ( isArray ( node ) ) {
54
+ if ( Array . isArray ( node ) ) {
56
55
let i = node . length ;
57
56
while ( i -- && removedKeyCount > 0 ) {
58
57
restoreDeletedValuesInNestedArray (
@@ -164,12 +163,12 @@ function diffNestedProperty(
164
163
return updatePayload ;
165
164
}
166
165
167
- if ( ! isArray ( prevProp ) && ! isArray ( nextProp ) ) {
166
+ if ( ! Array . isArray ( prevProp ) && ! Array . isArray ( nextProp ) ) {
168
167
// Both are leaves, we can diff the leaves.
169
168
return diffProperties ( updatePayload , prevProp , nextProp , validAttributes ) ;
170
169
}
171
170
172
- if ( isArray ( prevProp ) && isArray ( nextProp ) ) {
171
+ if ( Array . isArray ( prevProp ) && Array . isArray ( nextProp ) ) {
173
172
// Both are arrays, we can diff the arrays.
174
173
return diffNestedArrayProperty (
175
174
updatePayload ,
@@ -179,7 +178,7 @@ function diffNestedProperty(
179
178
) ;
180
179
}
181
180
182
- if ( isArray ( prevProp ) ) {
181
+ if ( Array . isArray ( prevProp ) ) {
183
182
return diffProperties (
184
183
updatePayload ,
185
184
// $FlowFixMe - We know that this is always an object when the input is.
@@ -213,7 +212,7 @@ function addNestedProperty(
213
212
return updatePayload ;
214
213
}
215
214
216
- if ( ! isArray ( nextProp ) ) {
215
+ if ( ! Array . isArray ( nextProp ) ) {
217
216
// Add each property of the leaf.
218
217
return addProperties ( updatePayload , nextProp , validAttributes ) ;
219
218
}
@@ -243,7 +242,7 @@ function clearNestedProperty(
243
242
return updatePayload ;
244
243
}
245
244
246
- if ( ! isArray ( prevProp ) ) {
245
+ if ( ! Array . isArray ( prevProp ) ) {
247
246
// Add each property of the leaf.
248
247
return clearProperties ( updatePayload , prevProp , validAttributes ) ;
249
248
}
0 commit comments