fix passing numbers to Text element

This commit is contained in:
Goran Gajic
2016-09-06 19:33:04 +02:00
parent 3016fb4a0f
commit 6bbd4d2d88
+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;
}