diff --git a/lib/extract/extractText.js b/lib/extract/extractText.js index 7a44f2ed..a04eda5a 100644 --- a/lib/extract/extractText.js +++ b/lib/extract/extractText.js @@ -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; }