File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
ReactCommon/react/renderer/components/view Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -174,20 +174,26 @@ inline void fromRawValue(
174
174
const PropsParserContext &context,
175
175
const RawValue &value,
176
176
AccessibilityUnit &result) {
177
- auto map = (butter::map< std::string, RawValue>)value;
178
- /*
177
+ // don't use std::string instead use RawValue and add a toString conversion
178
+ auto map = (butter::map<std::string, std::string>)value;
179
179
auto hours = map.find (" hours" );
180
180
if (hours != map.end ()) {
181
181
// This probably calls toString()
182
- fromRawValue(context, hours->second, result.hours) ;
182
+ result. hours = hours->second ;
183
183
}
184
- */
184
+ /*
185
185
if (value.hasType<std::string>()) {
186
- auto string = " 10 " ;
186
+ auto string = toString(value) ;
187
187
result.hours = string;
188
188
} else {
189
189
LOG(ERROR) << "Can not set type string for AccessibilityUnit field hours";
190
190
}
191
+ */
192
+ }
193
+
194
+ inline std::string toString (
195
+ const AccessibilityUnit &accessibilityUnit) {
196
+ return " default string" ;
191
197
}
192
198
193
199
inline std::string toString (
You can’t perform that action at this time.
0 commit comments