Fix asPath length bug

main
Mike Fix 7 years ago
parent 96ac36baf5
commit 1277a11143

@ -32,7 +32,7 @@ class Editor extends React.Component {
static async getInitialProps({ asPath }) { static async getInitialProps({ asPath }) {
try { try {
// TODO fix this hack // TODO fix this hack
if (asPath.length > 30) { if (asPath.length >= 20 && asPath.indexOf('.') === -1) {
const content = await api.getGist(asPath) const content = await api.getGist(asPath)
return { content } return { content }
} }

Loading…
Cancel
Save