fix: Fix login error
This commit is contained in:
1 parent
33a31f8a25
commit
3b33a9d194
1 file changed
+1
-7
@@ -17,14 +17,8 @@
|
||||
async function validateURL(instance: string): Promise<boolean> {
|
||||
if (instance == '') return false
|
||||
|
||||
if (!instance.startsWith('https://')) {
|
||||
instance = 'https://' + instance
|
||||
}
|
||||
|
||||
const url = new URL(instance)
|
||||
|
||||
try {
|
||||
await getClient(url.toString()).getSite({})
|
||||
await getClient(instance).getSite({})
|
||||
} catch (err) {
|
||||
throw new Error('Invalid instance URL')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user