Remove Gist call when favicon is requested for

main
Mike Fix 7 years ago
parent c9d4f9ea56
commit fd0fa897c4

@ -21,7 +21,7 @@ export default () => (
<link rel="stylesheet" href='//cdnjs.cloudflare.com/ajax/libs/codemirror/5.26.0/codemirror.min.css' />
{
THEMES.map((theme, i) => (
<link key={i} rel="stylesheet" href={`//cdnjs.cloudflare.com/ajax/libs/codemirror/5.26.0/theme/${theme.id}.min.css`}/>
<link key={i} rel="stylesheet" href={theme.link || `//cdnjs.cloudflare.com/ajax/libs/codemirror/5.26.0/theme/${theme.id}.min.css`}/>
))
}
<link rel="stylesheet" href="//cdn.jsdelivr.net/font-hack/2.020/css/hack-extended.min.css" />

@ -27,7 +27,8 @@ class Editor extends React.Component {
/* pathname, asPath, err, req, res */
static async getInitialProps ({ asPath }) {
try {
if (asPath !== '/') {
// TODO make this check generic
if (asPath && asPath !== '/' && asPath !== '/favicon.ico') {
const content = await api.getGist(asPath)
return { content }
}

Loading…
Cancel
Save