From c9e4b1b629e9571a132a5fca58e7f61c296b40a3 Mon Sep 17 00:00:00 2001 From: joshaber Date: Tue, 31 May 2016 14:37:39 -0400 Subject: [PATCH] Get outta there early if we don't have a user. --- src/info.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/info.tsx b/src/info.tsx index e3b1e610dc..bf0662496d 100644 --- a/src/info.tsx +++ b/src/info.tsx @@ -50,10 +50,15 @@ export default class Info extends React.Component { } public async componentWillMount() { + if (!this.props.user) { + return Promise.resolve() + } + const api = new Octokat({token: this.props.user.getToken()}) const user = await api.user.fetch() this.setState({userAvatarURL: user.avatarUrl}) console.log('user', user) + return Promise.resolve() } private renderNoSelection() {