From bda07e3f22aa95e836cf1468f4cc3bdbce5d2af8 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 27 Jan 2018 17:41:18 -0800 Subject: [PATCH] lowercase instance name when inputting --- routes/settings/instances/_actions/add.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/settings/instances/_actions/add.js b/routes/settings/instances/_actions/add.js index 5dc3cba6..920f7db8 100644 --- a/routes/settings/instances/_actions/add.js +++ b/routes/settings/instances/_actions/add.js @@ -12,7 +12,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('/$', '') + instanceName = instanceName.replace(/^https?:\/\//, '').replace('/$', '').toLowerCase() if (Object.keys(loggedInInstances).includes(instanceName)) { store.set({logInToInstanceError: `You've already logged in to ${instanceName}`}) return