Dont make gist request if at /

main
Mike Fix 8 years ago
parent c61f2184a9
commit 676fb594a4

@ -14,12 +14,14 @@ class Index extends React.Component {
/* pathname, asPath, err, req, res */
static async getInitialProps ({ asPath }) {
try {
const content = await api.getGist(asPath)
return { content }
if (asPath !== '/') {
const content = await api.getGist(asPath)
return { content }
}
} catch (e) {
console.log(e)
return {}
}
return {}
}
constructor() {

Loading…
Cancel
Save