fix: non-blocking romaji fetch in artist detail — prevent blank page on slow index load

This commit is contained in:
Honey committed 2026-05-27 15:08:11 +02:00
1 parent 27acede41d
commit b5ffb1e73d
1 file changed
+7 -2
+7 -2
View File
@@ -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');