Skip to content

Commit a214f0c

Browse files
committed
Fix LocalMods possibly uninitialized when calling modmanager.openModOptionsMenu
1 parent 55bc3e3 commit a214f0c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gui/options/mod-options-menu.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ declare global {
4242
}
4343
}
4444

45-
modmanager.openModOptionsMenu = (modId: string, tab?: number) => {
45+
modmanager.openModOptionsMenu = async (modId: string, tab?: number) => {
46+
await LocalMods.initAll()
4647
const record = LocalMods.getAllRecord()
4748
const mod = record[modId]
4849
if (!mod) throw new Error(`Mod: "${modId}" does not have options menu!`)

0 commit comments

Comments
 (0)