rep: handle setFont(undefined)

master
Rob Pilling 2023-05-25 23:19:30 +01:00
parent e83b582928
commit 2440613de1
1 changed files with 2 additions and 1 deletions

View File

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