diff --git a/routes/_actions/addInstance.js b/routes/_actions/addInstance.js index fd5a1ee..9fabce8 100644 --- a/routes/_actions/addInstance.js +++ b/routes/_actions/addInstance.js @@ -13,7 +13,7 @@ const REDIRECT_URI = (typeof location !== 'undefined' async function redirectToOauth () { let instanceName = store.get('instanceNameInSearch') let loggedInInstances = store.get('loggedInInstances') - instanceName = instanceName.replace(/^https?:\/\//, '').replace('/$', '').toLowerCase() + instanceName = instanceName.replace(/^https?:\/\//, '').replace(/\/$/, '').replace('/$', '').toLowerCase() if (Object.keys(loggedInInstances).includes(instanceName)) { store.set({logInToInstanceError: `You've already logged in to ${instanceName}`}) return