Quick fix on SAUCE
This commit is contained in:
parent
de339c9c52
commit
97ae34a971
|
@ -41,13 +41,13 @@ const SUPPORTED_ART_TYPES = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getFontNameFromSAUCE(sauce) {
|
function getFontNameFromSAUCE(sauce) {
|
||||||
if (sauce.Character) {
|
if (sauce && sauce.Character) {
|
||||||
return sauce.Character.fontName;
|
return sauce.Character.fontName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWidthFromSAUCE(sauce) {
|
function getWidthFromSAUCE(sauce) {
|
||||||
if (sauce.Character) {
|
if (sauce && sauce.Character) {
|
||||||
let sauceWidth = _.toNumber(sauce.Character.characterWidth);
|
let sauceWidth = _.toNumber(sauce.Character.characterWidth);
|
||||||
if(!(_.isNaN(sauceWidth)) && sauceWidth > 0) {
|
if(!(_.isNaN(sauceWidth)) && sauceWidth > 0) {
|
||||||
return sauceWidth;
|
return sauceWidth;
|
||||||
|
|
Loading…
Reference in New Issue