Skip to content

Commit

Permalink
Use the correct port when PORT is not set (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkonkle authored and jaredpalmer committed Aug 18, 2018
1 parent 68eead7 commit d7c8ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/razzle-dev-utils/webpackHotDevClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ErrorOverlay.startReportingRuntimeErrors({
launchEditorEndpoint: url.format({
protocol: window.location.protocol,
hostname: window.location.hostname,
port: parseInt(process.env.PORT, 10) + 1 || window.location.port,
port: parseInt(process.env.PORT || window.location.port, 10) + 1,
pathname: launchEditorEndpoint,
}),
onError: function() {
Expand All @@ -48,7 +48,7 @@ var connection = new SockJS(
url.format({
protocol: window.location.protocol,
hostname: window.location.hostname,
port: parseInt(process.env.PORT, 10) + 1 || window.location.port,
port: parseInt(process.env.PORT || window.location.port, 10) + 1,
// Hardcoded in WebpackDevServer
pathname: '/sockjs-node',
})
Expand Down

0 comments on commit d7c8ece

Please sign in to comment.