mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add toDynamic conversion function for ImageSource (#52237)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52237 For array props conversion following later in this stack, each type should have a toDynamic conversion available that can be called upon to convert all supported types to a `folly::dynamic` result. This diff adds the toDynamic conversion function for `ImageSource` Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D77234063 fbshipit-source-id: 392cbaf172595936f7f66faa824900dadd58bdcf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dca83bc158
commit
da0938edfd
+1
-1
@@ -105,7 +105,7 @@ function generatePropsDiffString(
|
||||
case 'ImageSourcePrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name}.toDynamic();
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ImageRequestPrimitive':
|
||||
// Shouldn't be used in props
|
||||
|
||||
Reference in New Issue
Block a user