fix: fetch romaji index on startup when showRomaji is enabled
On page reload the saved cfg restored showRomaji=true but _romajiMap was never fetched, so all display helpers fell back to Japanese text. Await fetchRomajiIndex before the first navigate when the setting is on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
40efa207bb
commit
6a28ba786c
1 file changed
+2
-1
+2
-1
@@ -1,6 +1,6 @@
|
||||
import { S } from './state.js';
|
||||
import { toast } from './utils.js';
|
||||
import { api } from './api.js';
|
||||
import { api, fetchRomajiIndex } from './api.js';
|
||||
import { injectPWA } from './pwa.js';
|
||||
import { loadSavedTheme } from './themes.js';
|
||||
import {
|
||||
@@ -94,6 +94,7 @@ async function startApp() {
|
||||
if (bnav) bnav.style.display = '';
|
||||
absLoadSettingsLibraries();
|
||||
}
|
||||
if (S.cfg.showRomaji) await fetchRomajiIndex().catch(() => {});
|
||||
if(_navLoad() && S._navCursor >= 0 && S._navStack[S._navCursor]) {
|
||||
const last = S._navStack[S._navCursor];
|
||||
S._navJumping = true;
|
||||
|
||||
Reference in new issue
Block a user