lowercase instance name when inputting
This commit is contained in:
parent
5a55506204
commit
bda07e3f22
|
@ -12,7 +12,7 @@ const REDIRECT_URI = (typeof location !== 'undefined' ?
|
||||||
async function redirectToOauth() {
|
async function redirectToOauth() {
|
||||||
let instanceName = store.get('instanceNameInSearch')
|
let instanceName = store.get('instanceNameInSearch')
|
||||||
let loggedInInstances = store.get('loggedInInstances')
|
let loggedInInstances = store.get('loggedInInstances')
|
||||||
instanceName = instanceName.replace(/^https?:\/\//, '').replace('/$', '')
|
instanceName = instanceName.replace(/^https?:\/\//, '').replace('/$', '').toLowerCase()
|
||||||
if (Object.keys(loggedInInstances).includes(instanceName)) {
|
if (Object.keys(loggedInInstances).includes(instanceName)) {
|
||||||
store.set({logInToInstanceError: `You've already logged in to ${instanceName}`})
|
store.set({logInToInstanceError: `You've already logged in to ${instanceName}`})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue