mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-24 11:44:39 +00:00
fix passing numbers to Text element
This commit is contained in:
@@ -8,9 +8,12 @@ const fontFamilySuffix = /[\s"']*$/;
|
||||
let cachedFontObjectsFromString = {};
|
||||
|
||||
function childrenAsString(children) {
|
||||
if (!children) {
|
||||
if (typeof children === 'undefined') {
|
||||
return '';
|
||||
}
|
||||
if (typeof children === 'number') {
|
||||
return children.toString();
|
||||
}
|
||||
if (typeof children === 'string') {
|
||||
return children;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user