From c93141daedcee6b6b08e1c7e280804c285ae1657 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 27 Jan 2018 16:28:58 -0800 Subject: [PATCH] correctly set error in add.html --- routes/settings/instances/_actions/add.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/routes/settings/instances/_actions/add.js b/routes/settings/instances/_actions/add.js index 743a87d2..5dc3cba6 100644 --- a/routes/settings/instances/_actions/add.js +++ b/routes/settings/instances/_actions/add.js @@ -9,12 +9,6 @@ import { updateVerifyCredentialsForInstance } from './[instanceName]' const REDIRECT_URI = (typeof location !== 'undefined' ? location.origin : 'https://pinafore.social') + '/settings/instances/add' -store.onchange((state, changed) => { - if (changed['instanceNameInSearch']) { - store.set({logInToInstanceError: false}) - } -}) - async function redirectToOauth() { let instanceName = store.get('instanceNameInSearch') let loggedInInstances = store.get('loggedInInstances') @@ -42,6 +36,7 @@ async function redirectToOauth() { export async function logInToInstance() { store.set({logInToInstanceLoading: true}) + store.set({logInToInstanceError: null}) try { await redirectToOauth() } catch (err) {