1
0
Fork 0

rep: guard against undefined font

master
Rob Pilling 2023-06-18 21:41:36 +01:00
parent f7533cc118
commit 17ff3fdd00
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ const renderDuration = (l: Layout.RenderedHierarchy) => {
lbl = "RDY";
}
g.setFont(l.font!); // don't chain - might be undefined (TODO: typings)
if(l.font)
g.setFont(l.font); // don't chain - might be undefined
g.setColor(l.col || g.theme.fg)
.setFontAlign(0, 0)