mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fix crash in RCTText in open source RNTester
Summary: See https://github.com/facebook/react-native/issues/24288 Reviewed By: sahrens Differential Revision: D14765625 fbshipit-source-id: f7275f3735691e1f0c87e682f6dd675e5ba5a7c0
This commit is contained in:
committed by
Facebook Github Bot
parent
da44010b59
commit
e62cfc0f72
@@ -288,7 +288,11 @@ import javax.annotation.Nullable;
|
||||
@Override
|
||||
protected @Nullable Object getValueOrDefault(Object value) {
|
||||
if (value != null) {
|
||||
return (Integer) value;
|
||||
if (value instanceof Double) {
|
||||
return ((Double) value).intValue();
|
||||
} else {
|
||||
return (Integer) value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user