mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
fix first run startup failure
This commit is contained in:
parent
7ab035d9ba
commit
18e4a9ab70
@ -181,6 +181,6 @@ export async function setProfileStr(id: string, content: string): Promise<void>
|
||||
}
|
||||
}
|
||||
|
||||
export function getProfile(id: string): IMihomoConfig {
|
||||
return yaml.parse(getProfileStr(id))
|
||||
export function getProfile(id: string | undefined): IMihomoConfig {
|
||||
return yaml.parse(getProfileStr(id || 'default'))
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import fs from 'fs'
|
||||
|
||||
export function generateProfile(): void {
|
||||
const current = getProfileConfig().current
|
||||
if (!current) return
|
||||
const currentProfile = getProfile(current)
|
||||
const controledMihomoConfig = getControledMihomoConfig()
|
||||
const { tun: profileTun = {} } = currentProfile
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user