chore: fix type error

This commit is contained in:
2026-01-15 10:41:19 +01:00
parent 8c4fa5ccdf
commit 58e0c1ed82

View File

@@ -98,7 +98,11 @@ onRender((ctx) => {
: assets.images.settings.bottomScreen.options.languageButton; : assets.images.settings.bottomScreen.options.languageButton;
buttonImage.draw(ctx, x, y, isSelected ? { colored: true } : undefined); 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);
} }
}); });