fix(settings/options/language): key not found because language wasn't loaded yet

This commit is contained in:
2026-02-26 20:39:16 +01:00
parent 3dfed22a28
commit 7224dd29d7
3 changed files with 5 additions and 8 deletions

View File

@@ -42,7 +42,8 @@ onRender((ctx) => {
ctx.textBaseline = "top";
ctx.fillStyle = "#ffffff";
const lines = confirmationModal.text.split("\n").slice(0, MAX_LINES);
const rawText = typeof confirmationModal.text === "function" ? confirmationModal.text() : confirmationModal.text;
const lines = rawText.split("\n").slice(0, MAX_LINES);
const totalTextHeight = lines.length * LINE_HEIGHT;
const textStartY = BG_Y + Math.floor((BG_HEIGHT - totalTextHeight) / 2) - 2;