Skip to content

Commit

Permalink
Merge branch 'canary' into bugfix/vercel#2825-changing-hash-triggers-…
Browse files Browse the repository at this point in the history
…getInitialProps
  • Loading branch information
Michael Herold authored Nov 21, 2018
2 parents f5a3766 + 19db04f commit 1a87ac0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/next-server/server/next-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ export default class Server {
if (!fs.existsSync(resolve(this.distDir, BUILD_ID_FILE))) {
throw new Error(`Could not find a valid build in the '${this.distDir}' directory! Try building your app with 'next build' before starting the server.`)
}
const buildIdPath = join(this.distDir, BUILD_ID_FILE)
const buildId = fs.readFileSync(buildIdPath, 'utf8')
return buildId.trim()
return fs.readFileSync(join(this.distDir, BUILD_ID_FILE), 'utf8').trim()
}
}
2 changes: 1 addition & 1 deletion packages/next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Router.beforePopState(({ url, as, options }) => {
});
```

If you return a `false` value from `beforePopState`, `Router` will not handle `popstate`;
If the function you pass into `beforePopState` returns `false`, `Router` will not handle `popstate`;
you'll be responsible for handling it, in that case.
See [Disabling File-System Routing](#disabling-file-system-routing).

Expand Down

0 comments on commit 1a87ac0

Please sign in to comment.