Skip to content

Commit 12b2e7d

Browse files
committed
1 parent 25b1b72 commit 12b2e7d

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -494,21 +494,22 @@ function fastAddProperties(
494494
} else {
495495
continue;
496496
}
497-
} else if (
498-
typeof attributeConfig === 'object' &&
499-
typeof attributeConfig.process === 'function'
500-
) {
501-
// An atomic prop with custom processing.
502-
newValue = attributeConfig.process(prop);
503-
} else if (typeof prop === 'function') {
504-
// A function prop. It represents an event handler. Pass it to native as 'true'.
505-
newValue = true;
506-
} else if (typeof attributeConfig !== 'object') {
507-
// An atomic prop. Doesn't need to be flattened.
508-
newValue = prop;
509-
} else if (typeof attributeConfig.diff === 'function') {
510-
// An atomic prop with custom diffing. We don't need to do diffing when adding props.
511-
newValue = prop;
497+
} else if (typeof attributeConfig === 'object') {
498+
if (typeof attributeConfig.process === 'function') {
499+
// An atomic prop with custom processing.
500+
newValue = attributeConfig.process(prop);
501+
} else if (typeof attributeConfig.diff === 'function') {
502+
// An atomic prop with custom diffing. We don't need to do diffing when adding props.
503+
newValue = prop;
504+
}
505+
} else {
506+
if (typeof prop === 'function') {
507+
// A function prop. It represents an event handler. Pass it to native as 'true'.
508+
newValue = true;
509+
} else {
510+
// An atomic prop. Doesn't need to be flattened.
511+
newValue = prop;
512+
}
512513
}
513514

514515
if (newValue !== undefined) {

0 commit comments

Comments
 (0)