mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Additional temporary checks in prop parsing infra
Summary: While ViewConfig infra isn't perfect we need to check that for correcness. See the task for more details. Reviewed By: JoshuaGross Differential Revision: D15578675 fbshipit-source-id: c99c2be9c215e6b9d7ee8e6e50d85e822c1f007e
This commit is contained in:
committed by
Facebook Github Bot
parent
18fededae0
commit
5a8cdb4bb7
@@ -35,11 +35,18 @@ inline void fromRawValue(const RawValue &value, ImageSource &result) {
|
||||
}
|
||||
|
||||
if (items.find("width") != items.end() &&
|
||||
items.find("height") != items.end()) {
|
||||
items.find("height") != items.end() &&
|
||||
// The following checks have to be removed after codegen is shipped.
|
||||
// See T45151459.
|
||||
items.at("width").hasType<Float>() &&
|
||||
items.at("height").hasType<Float>()) {
|
||||
result.size = {(Float)items.at("width"), (Float)items.at("height")};
|
||||
}
|
||||
|
||||
if (items.find("scale") != items.end()) {
|
||||
if (items.find("scale") != items.end() &&
|
||||
// The following checks have to be removed after codegen is shipped.
|
||||
// See T45151459.
|
||||
items.at("scale").hasType<Float>()) {
|
||||
result.scale = (Float)items.at("scale");
|
||||
} else {
|
||||
result.scale = items.find("deprecated") != items.end() ? 0.0 : 1.0;
|
||||
|
||||
Reference in New Issue
Block a user