fix: simplify redirect url logic (#1500)

This commit is contained in:
Nolan Lawson 2019-09-20 18:53:37 -07:00 committed by GitHub
parent ab9fc31405
commit abfe232f0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)