From abfe232f0ec8b3fd44cf655858a7d0f6d8b8c624 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 20 Sep 2019 18:53:37 -0700 Subject: [PATCH] fix: simplify redirect url logic (#1500) --- src/routes/_actions/addInstance.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/_actions/addInstance.js b/src/routes/_actions/addInstance.js index 91ff58ae..64deb30d 100644 --- a/src/routes/_actions/addInstance.js +++ b/src/routes/_actions/addInstance.js @@ -8,8 +8,7 @@ import { updateCustomEmojiForInstance } from './emoji' import { database } from '../_database/database' import { DOMAIN_BLOCKS } from '../_static/blocks' -const REDIRECT_URI = (typeof location !== 'undefined' - ? location.origin : 'https://pinafore.social') + '/settings/instances/add' +const REDIRECT_URI = process.browser && `${location.origin}/settings/instances/add` function createKnownError (message) { const err = new Error(message)