Skip to content

Commit 6a45453

Browse files
Send null for a removed Image tintColor in Props 2.0 payloads
An unset tintColor is now sent as null with the flag off too, as the flag-on path already does. Defined colors are sent unchanged.
1 parent 3ef2239 commit 6a45453

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/react-native/ReactCommon/react/renderer/components/image

‎packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ folly::dynamic ImageProps::getDiffProps(const Props* prevProps) const {
224224
SharedColor prevTintColorValue =
225225
oldProps->tintColor.value_or(SharedColor{});
226226
if (tintColorValue != prevTintColorValue) {
227-
result["tintColor"] = *tintColorValue;
227+
result["tintColor"] = tintColorValue ? folly::dynamic(*tintColorValue)
228+
: folly::dynamic(nullptr);
228229
}
229230
}
230231

0 commit comments

Comments
 (0)