Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
fanyang
2026-07-04 12:27:45 +08:00
committed by GitHub
parent 7fc954a6dc
commit c5041aec2d
@@ -12,9 +12,10 @@ const props = defineProps<{
const list = defineModel<string[]>({ required: true })
const fallbackUrl = () => {
const defaultProto = Object.keys(props.protos).includes('tcp')
const protoKeys = Object.keys(props.protos)
const defaultProto = protoKeys.includes('tcp')
? 'tcp'
: (Object.keys(props.protos)[0] ?? 'tcp')
: (protoKeys[0] ?? 'tcp')
const defaultPort = props.protos[defaultProto] ?? 11010
return `${defaultProto}://0.0.0.0:${defaultPort}`
}