Skip to content

Commit

Permalink
fix hosts input
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Feb 20, 2025
1 parent 054eea5 commit 7580a0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/utils/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ async function migration(): Promise<void> {
useSubStore = true,
showFloatingWindow = false,
disableTray = false,
encryptedPassword
encryptedPassword,
hosts = [],
} = await getAppConfig()
const {
'external-controller-pipe': externalControllerPipe,
Expand Down Expand Up @@ -192,6 +193,10 @@ async function migration(): Promise<void> {
if (!lanDisallowedIps) {
await patchControledMihomoConfig({ 'lan-disallowed-ips': [] })
}
// add default hosts
if (!hosts.length) {
await patchAppConfig({ hosts: [] })
}
// remove custom app theme
if (!['system', 'light', 'dark'].includes(appTheme)) {
await patchAppConfig({ appTheme: 'system' })
Expand Down

0 comments on commit 7580a0f

Please sign in to comment.