Skip to content

Commit

Permalink
deal with undefined server error
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed May 21, 2021
1 parent 854f621 commit e61ce80
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/utils/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,5 @@
* @returns {string}
*/
export function getHubUrl (user) {
let hubUrl = '/hub/home'
if (user) {
let baseUrl = ''
const server = user.server
const userTokenIdx = server.lastIndexOf('/user')
if (userTokenIdx > 0) {
baseUrl = server.substring(0, userTokenIdx)
}
hubUrl = `${baseUrl}${hubUrl}`
}
return hubUrl
return '/hub/home'
}

0 comments on commit e61ce80

Please sign in to comment.