From b5ffb1e73d1a98ff3c0b739cda53a3f6305ee229 Mon Sep 17 00:00:00 2001 From: Honey Date: Wed, 27 May 2026 15:08:11 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20non-blocking=20romaji=20fetch=20in=20art?= =?UTF-8?q?ist=20detail=20=E2=80=94=20prevent=20blank=20page=20on=20slow?= =?UTF-8?q?=20index=20load?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views.js b/src/views.js index ddd5faa..31a39f6 100644 --- a/src/views.js +++ b/src/views.js @@ -356,9 +356,14 @@ function _makeTopsongRow(s, num, subtitle, list, idx) { // ─── ARTIST DETAIL ─── export async function loadArtistDetail(artist) { - if (S.cfg.showRomaji) await fetchRomajiIndex().catch(() => {}); - document.getElementById('artist-detail-name').textContent = dispArtistById(artist.id, artist.name); + const nameEl = document.getElementById('artist-detail-name'); + nameEl.textContent = artist.name; document.getElementById('artist-back-btn').onclick = () => _navGoBack(); + if (S.cfg.showRomaji) { + fetchRomajiIndex() + .then(() => { nameEl.textContent = dispArtistById(artist.id, artist.name); }) + .catch(() => {}); + } const hero = document.getElementById('artist-detail-hero'); const bioEl = document.getElementById('artist-bio-section');