chore: fix type error
This commit is contained in:
@@ -98,7 +98,11 @@ onRender((ctx) => {
|
||||
: assets.images.settings.bottomScreen.options.languageButton;
|
||||
|
||||
buttonImage.draw(ctx, x, y, isSelected ? { colored: true } : undefined);
|
||||
fillTextHCentered(ctx, locales.value[i].name, x, y + 20, 96);
|
||||
const name = locales.value[i]?.name;
|
||||
if (!name) {
|
||||
throw new Error(`Missing locale or locale name: ${BUTTON_KEYS[i]}`);
|
||||
}
|
||||
fillTextHCentered(ctx, name, x, y + 20, 96);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user