mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-01 10:33:14 +08:00
fix(keybase): Invite fetch doesn't need JSON parse
This commit is contained in:
parent
04e3154614
commit
5810aeeefc
1 changed files with 2 additions and 3 deletions
|
@ -41,12 +41,11 @@ class KeybaseInviteButton extends React.Component
|
|||
success: (body, response) =>
|
||||
@setState({loading: false})
|
||||
try
|
||||
{invite_url} = JSON.parse(body)
|
||||
if not invite_url
|
||||
if not (body instanceof Object) or not body.invite_url
|
||||
throw new Error("We were unable to retrieve an invitation.")
|
||||
catch err
|
||||
errorHandler(err)
|
||||
require('electron').shell.openExternal(invite_url)
|
||||
require('electron').shell.openExternal(body.invite_url)
|
||||
|
||||
render: =>
|
||||
if @state.loading
|
||||
|
|
Loading…
Reference in a new issue