Skip to content

Commit

Permalink
fix: get rid of split
Browse files Browse the repository at this point in the history
  • Loading branch information
vcellu committed May 13, 2022
1 parent 22c0c0a commit 9fb19d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/carbonRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const carbonRenderer = () => {
rnRenderer.root = () => element;

rnRenderer.measureText = (opt) => {
if (opt.text) {
const fontFamily = opt.fontFamily.split(',')[0];
if (opt.text && opt.fontSize) {
const fontFamily = opt.fontFamily || "Source Sans Pro";
const fontSize = parseInt(opt.fontSize, 10);
const text = opt.text;
if(text.length > 0) {
Expand Down

0 comments on commit 9fb19d1

Please sign in to comment.