Quick fix on SAUCE

This commit is contained in:
Bryan Ashby 2023-08-27 17:31:35 -06:00
parent de339c9c52
commit 97ae34a971
1 changed files with 2 additions and 2 deletions

View File

@ -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;