Merge pull request #136 from gorangajic/master

fix passing numbers to Text element
This commit is contained in:
Horcrux
2016-09-09 20:37:32 +08:00
committed by GitHub
+4 -1
View File
@@ -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;
}