fix: non-blocking romaji fetch in artist detail — prevent blank page on slow index load
This commit is contained in:
1 parent
27acede41d
commit
b5ffb1e73d
1 file changed
+7
-2
+7
-2
@@ -356,9 +356,14 @@ function _makeTopsongRow(s, num, subtitle, list, idx) {
|
|||||||
|
|
||||||
// ─── ARTIST DETAIL ───
|
// ─── ARTIST DETAIL ───
|
||||||
export async function loadArtistDetail(artist) {
|
export async function loadArtistDetail(artist) {
|
||||||
if (S.cfg.showRomaji) await fetchRomajiIndex().catch(() => {});
|
const nameEl = document.getElementById('artist-detail-name');
|
||||||
document.getElementById('artist-detail-name').textContent = dispArtistById(artist.id, artist.name);
|
nameEl.textContent = artist.name;
|
||||||
document.getElementById('artist-back-btn').onclick = () => _navGoBack();
|
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 hero = document.getElementById('artist-detail-hero');
|
||||||
const bioEl = document.getElementById('artist-bio-section');
|
const bioEl = document.getElementById('artist-bio-section');
|
||||||
|
|||||||
Reference in new issue
Block a user