mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Avoid serializing UndefinedColor when rendering texts
Summary: This diff avoids the serialization of color that are set as: "UndefinedColor". This allows the text rendering system to set the default color in the native side Reviewed By: shergin Differential Revision: D10275834 fbshipit-source-id: b81c7a5995bef65e04a246d99f44ff10cb20f548
This commit is contained in:
parent
397573ffed
commit
28d80e4717
@ -387,7 +387,9 @@ inline folly::dynamic toDynamic(
|
||||
|
||||
inline folly::dynamic toDynamic(const TextAttributes &textAttributes) {
|
||||
auto _textAttributes = folly::dynamic::object();
|
||||
_textAttributes("foregroundColor", toDynamic(textAttributes.foregroundColor));
|
||||
if (textAttributes.foregroundColor) {
|
||||
_textAttributes("foregroundColor", toDynamic(textAttributes.foregroundColor));
|
||||
}
|
||||
if (textAttributes.backgroundColor) {
|
||||
_textAttributes(
|
||||
"backgroundColor", toDynamic(textAttributes.backgroundColor));
|
||||
|
Loading…
x
Reference in New Issue
Block a user