From fd0fa897c49ee5e7b88b7fa24292ff69590da9e5 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sat, 23 Sep 2017 14:29:22 -0700 Subject: [PATCH] Remove Gist call when favicon is requested for --- components/Meta.js | 2 +- pages/editor.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Meta.js b/components/Meta.js index 96ad3fc..d3cac41 100644 --- a/components/Meta.js +++ b/components/Meta.js @@ -21,7 +21,7 @@ export default () => ( { THEMES.map((theme, i) => ( - + )) } diff --git a/pages/editor.js b/pages/editor.js index 1bfb4e6..d60dbe0 100644 --- a/pages/editor.js +++ b/pages/editor.js @@ -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 } }