From 1277a1114384264e198c95f856fef43d05cec61f Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 22 Oct 2017 21:44:35 -0700 Subject: [PATCH] Fix asPath length bug --- pages/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/editor.js b/pages/editor.js index b97a913..f3cf083 100644 --- a/pages/editor.js +++ b/pages/editor.js @@ -32,7 +32,7 @@ class Editor extends React.Component { static async getInitialProps({ asPath }) { try { // TODO fix this hack - if (asPath.length > 30) { + if (asPath.length >= 20 && asPath.indexOf('.') === -1) { const content = await api.getGist(asPath) return { content } }