Skip to content

Commit

Permalink
Fix an issue where production was warning in console log due to undef…
Browse files Browse the repository at this point in the history
…ined variable
  • Loading branch information
dsgnr committed Dec 10, 2021
1 parent 61ab8c5 commit 9eee89e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.0.9] - 2021-12-10

- Resolve console warning about undefined DEFAULT_PORT var in production

## [1.0.8] - 2021-12-10

- Add dependabot monitoring to repository
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
image: dsgnr/portcheckerio-ui:latest
pull_policy: always
container_name: portcheckerio
environment:
- DEFAULT_PORT=
ports:
- 80:80
restart: unless-stopped
2 changes: 1 addition & 1 deletion webui/src/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class HomePage extends Component {
portError: "",
showResults: false,
host: "",
ports: parseInt(process.env.DEFAULT_PORT),
ports: parseInt(process.env.DEFAULT_PORT) || "",
results: [],
msg: ""
};
Expand Down
2 changes: 1 addition & 1 deletion webui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
'process.env.DEFAULT_PORT': JSON.stringify(process.env.DEFAULT_PORT) || null
'process.env.DEFAULT_PORT': process.env.DEFAULT_PORT || null
}),
new HtmlWebpackPlugin({
hash: true,
Expand Down

0 comments on commit 9eee89e

Please sign in to comment.