fix: allow empty server for sign in

zio/stable
三咲智子 2022-11-27 17:29:25 +08:00
parent a101b79486
commit bb69e6f231
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
1 changed files with 2 additions and 4 deletions

View File

@ -4,10 +4,8 @@ import { DEFAULT_SERVER } from '~/constants'
let server = $ref<string>('')
async function oauth() {
if (!server)
return
server = server.split('/')[0]
if (server)
server = server.split('/')[0]
location.href = `/api/${server || DEFAULT_SERVER}/login`
}