Skip to content

Commit

Permalink
fix: The http proxy empty has wrong value
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jun 22, 2023
1 parent bf26ae9 commit 2f2489a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xmcl-keystone-ui/src/composables/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ export function useSettings() {

onUnmounted(() => {
const p = proxy.value
const newValue = `http://${p.host}:${p.port}`
const newValue =
!p.host && !p.port
? ''
: `http://${p.host}:${p.port}`
if (newValue !== state.httpProxy) {
state.httpProxySet(`http://${p.host}:${p.port}`)
state.httpProxySet(newValue)
}
if (state.maxSockets !== maxSockets.value) {
state.maxSocketsSet(Number(maxSockets.value))
Expand Down

0 comments on commit 2f2489a

Please sign in to comment.